Switch to sourcing in init-tools to enable the return statements to work
authorWes Haggard <Wes.Haggard@microsoft.com>
Thu, 26 Oct 2017 16:31:31 +0000 (09:31 -0700)
committerWes Haggard <Wes.Haggard@microsoft.com>
Mon, 30 Oct 2017 20:06:27 +0000 (13:06 -0700)
build.sh
run.sh

index cbb2c8e..415736a 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -175,7 +175,7 @@ restore_optdata()
         # Parse the optdata package versions out of msbuild so that we can pass them on to CMake
         local DotNetCli="$__ProjectRoot/Tools/dotnetcli/dotnet"
         if [ ! -f $DotNetCli ]; then
-            "$__ProjectRoot/init-tools.sh"
+            source "$__ProjectRoot/init-tools.sh"
             if [ $? != 0 ]; then
                 echo "Failed to restore buildtools."
                 exit 1
@@ -334,7 +334,7 @@ build_native()
         echo "Failed to generate $message build project!"
         exit 1
     fi
-    
+
     # Build
     if [ $__ConfigureOnly == 1 ]; then
         echo "Finish configuration & skipping $message build."
diff --git a/run.sh b/run.sh
index bd6a68f..2d037e9 100755 (executable)
--- a/run.sh
+++ b/run.sh
@@ -3,7 +3,7 @@
 working_tree_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 echo "Running init-tools.sh"
-$working_tree_root/init-tools.sh
+source $working_tree_root/init-tools.sh
 
 toolRuntime=$working_tree_root/Tools
 dotnet=$toolRuntime/dotnetcli/dotnet