Bug 1444141 - part 3 - fix exports of PATH in sm-tooltool-config.sh; r=sfink
authorNathan Froyd <froydnj@mozilla.com>
Thu, 02 Aug 2018 12:00:21 -0400
changeset 429875 6c0285701a15fd779cb7964bb434f7841ecfd1d7
parent 429874 74d0193f2bd34cc15a17d02db9e675f5c83d657b
child 429876 e1f22d19eb6933f2ffc3dc9b78b0cf66d8648474
push id34375
push usernbeleuzu@mozilla.com
push dateThu, 02 Aug 2018 22:28:56 +0000
treeherdermozilla-central@b1c100e2b29a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1444141
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1444141 - part 3 - fix exports of PATH in sm-tooltool-config.sh; r=sfink TOOLTOOL_CHECKOUT is typically `.`, which doesn't work so great for adding things to $PATH. We need to turn everything we're adding to $PATH into absolute paths, so $PATH actually works properly.
taskcluster/scripts/builder/sm-tooltool-config.sh
--- a/taskcluster/scripts/builder/sm-tooltool-config.sh
+++ b/taskcluster/scripts/builder/sm-tooltool-config.sh
@@ -58,10 +58,14 @@ fi
 BROWSER_PLATFORM=$PLATFORM_OS$BITS
 
 (cd $TOOLTOOL_CHECKOUT && ${SRCDIR}/mach artifact toolchain${TOOLTOOL_MANIFEST:+ -v $TOOLTOOL_AUTH_FLAGS --tooltool-url $TOOLTOOL_SERVER --tooltool-manifest $SRCDIR/$TOOLTOOL_MANIFEST}${TOOLTOOL_CACHE:+ --cache-dir $TOOLTOOL_CACHE}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}})
 
 ) || exit 1 # end of set -e scope
 
 # Add all the tooltool binaries to our $PATH.
 for bin in $TOOLTOOL_CHECKOUT/*/bin $TOOLTOOL_CHECKOUT/VC/bin/Hostx64/x86; do
-    export PATH="$bin:$PATH"
+    if [ ! -d "$bin" ]; then
+        continue
+    fi
+    absbin=$(cd "$bin" && pwd)
+    export PATH="$absbin:$PATH"
 done