Emscripten: source emsdk_env.sh errors with: `BASH_SOURCE: parameter not set` if set -u + zsh is used

Created on 23 Jun 2018  路  6Comments  路  Source: emscripten-core/emscripten

source emsdk_env.sh
emsdk_env.sh:18: BASH_SOURCE: parameter not set

cause:
I have set -u in my shell (to avoid common errors) and use zsh.

workaround until emsdk_env.sh is fixed:
instead of source /path/to/emsdk_env.sh, call: BASH_SOURCE=/path/to/emsdk_env.sh source /path/to/emsdk_env.sh

good first bug help wanted

Most helpful comment

F the stale state, it's still an issue !

All 6 comments

This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.

F the stale state, it's still an issue !

Ok, reopening.

If you would like to fix it any patches would be very welcome. I don't know of any emscripten developers who use zsh so we might not be the best placed to fix it.

It could be that you need to create a new emsdk_env.zsh file (like the .csh and .fish and .ps1 scripts we have to other shells)? I'm not sure.

This also breaks on Bourne shell.

To be clear, it's not really a shell specific issue, any script that has set -u ran and then sources the env script will fail.

Was this page helpful?
0 / 5 - 0 ratings