From 2a11e40723f75adeace4523d66a980e39ed166b6 Mon Sep 17 00:00:00 2001 From: Wes Haggard Date: Wed, 29 Nov 2017 15:24:22 -0800 Subject: [PATCH] Sync run.sh script with what is in corefx In particular we need to 'source' (i.e. '.') the init-tools script so that it can correctly exit when tools are already initialized. Commit migrated from https://github.com/dotnet/core-setup/commit/718ffc8559ccd0cdbbb48c31b55dac3bded15014 --- src/installer/run.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/installer/run.sh b/src/installer/run.sh index 56e18f2..f4bf53b 100755 --- a/src/installer/run.sh +++ b/src/installer/run.sh @@ -1,22 +1,16 @@ #!/usr/bin/env bash -# -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# -set -e - -# Use in the the functions: eval $invocation -invocation='echo "Calling: ${FUNCNAME[0]}"' __scriptpath=$(cd "$(dirname "$0")"; pwd -P) -__toolsLocalPath=$__scriptpath/Tools # We do not want to run the first-time experience. export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -$__scriptpath/init-tools.sh +# Source the init-tools.sh script rather than execute in order to preserve ulimit values in child-processes. https://github.com/dotnet/corefx/issues/19152 +. $__scriptpath/init-tools.sh -__dotnet=$__toolsLocalPath/dotnetcli/dotnet +__toolRuntime=$__scriptpath/Tools +__dotnet=$__toolRuntime/dotnetcli/dotnet -$__dotnet $__toolsLocalPath/run.exe $* +cd $__scriptpath +$__dotnet $__toolRuntime/run.exe $__scriptpath/config.json $* exit $? -- 2.7.4