From 51b4bdb92f6d814fcb161eb3edc4e17d0539adcc Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Mon, 26 Aug 2019 21:14:12 -0700 Subject: [PATCH] Remove extraneous arguments to construct_env The code for construct_env expects the output file to be at `argv[2]`, but it is actually invoked in emsdk_env.{sh,fish} with $@ there instead. Usually this is not a problem because the emdsk_env.{sh,fish} is `sourced` directly from the user's shell and $@ is empty, but this can break in scripted environments. The $@ was added two years ago in 3b6c6b86 for no discernible reason, but it was entirely ignored in the code until last month when #307 added a meaningful argument to construct_env but incorrectly kept the $@. --- emsdk_env.fish | 2 +- emsdk_env.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/emsdk_env.fish b/emsdk_env.fish index 9f6e15a79d..99119b73eb 100755 --- a/emsdk_env.fish +++ b/emsdk_env.fish @@ -8,7 +8,7 @@ set -l dir (dirname $script) pushd $dir > /dev/null -./emsdk construct_env "$argv" +./emsdk construct_env . ./emsdk_set_env.sh set -e -l script diff --git a/emsdk_env.sh b/emsdk_env.sh index 4619f38c70..68616157b1 100755 --- a/emsdk_env.sh +++ b/emsdk_env.sh @@ -23,7 +23,7 @@ cd "$(dirname "$SRC")" unset SRC tmpfile=`mktemp` || exit 1 -./emsdk construct_env "$@" $tmpfile +./emsdk construct_env $tmpfile . $tmpfile rm -f $tmpfile