Skip to content

Commit 1ea9c32

Browse files
authored
Remove extraneous arguments to construct_env (#328)
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 #307 added a meaningful argument to construct_env but incorrectly kept the $@.
1 parent 596bdc5 commit 1ea9c32

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

emsdk_env.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -l dir (dirname $script)
88

99
pushd $dir > /dev/null
1010

11-
./emsdk construct_env "$argv"
11+
./emsdk construct_env
1212
. ./emsdk_set_env.sh
1313

1414
set -e -l script

emsdk_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ cd "$(dirname "$SRC")"
2323
unset SRC
2424

2525
tmpfile=`mktemp` || exit 1
26-
./emsdk construct_env "$@" $tmpfile
26+
./emsdk construct_env $tmpfile
2727
. $tmpfile
2828
rm -f $tmpfile
2929

0 commit comments

Comments
 (0)