Skip to content

Commit

Permalink
Remove extraneous arguments to construct_env (emscripten-core#328)
Browse files Browse the repository at this point in the history
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 3b6c6b8 for no discernible reason,
but it was entirely ignored in the code until last month when emscripten-core#307
added a meaningful argument to construct_env but incorrectly kept the
$@.
  • Loading branch information
tlively authored Aug 27, 2019
1 parent 596bdc5 commit 1ea9c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion emsdk_env.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion emsdk_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1ea9c32

Please sign in to comment.