Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bashism in emsdk_env.sh in favor of portable alternative #220

Merged
merged 1 commit into from Feb 21, 2019
Merged

Remove bashism in emsdk_env.sh in favor of portable alternative #220

merged 1 commit into from Feb 21, 2019

Conversation

nic-hartley
Copy link
Contributor

@nic-hartley nic-hartley commented Feb 15, 2019

Fixes #219

I also replaced the backticks with $() because they're the modern POSIX standard and look moderately prettier. I'm fine changing it back.

@nic-hartley nic-hartley changed the title Remove bashism in favor of portable alternative Remove bashism in emsdk_env.sh in favor of portable alternative Feb 15, 2019
@kripken
Copy link
Member

kripken commented Feb 19, 2019

This looks good to me, thanks @nic-hartley!

Does anyone feel strongly about pushd/popd? @juj?

@juj
Copy link
Collaborator

juj commented Feb 21, 2019

lgtm

@juj juj merged commit a77638d into emscripten-core:master Feb 21, 2019
@nic-hartley nic-hartley deleted the patch-1 branch February 21, 2019 18:28
Coder-256 added a commit to Coder-256/emsdk that referenced this pull request Mar 6, 2019
It seems that some variables were mistakenly left unquoted, leading to paths containing spaces being treated incorrectly.

For example, the directory `/home/person/foo bar/test/` would cause `CURDIR=$(pwd)` to be expanded to `CURDIR=/home/person/foo bar/test/`. This means that the shell would attempt to run the command `bar/test/` with the environment variable `CURDIR` set to `/home/person/foo`. This is due to [word splitting](https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html). (TL;DR the result of shell expansions should probably be quoted 99% of the time)
kripken pushed a commit that referenced this pull request Mar 6, 2019
It seems that some variables were mistakenly left unquoted, leading to paths containing spaces being treated incorrectly.

For example, the directory `/home/person/foo bar/test/` would cause `CURDIR=$(pwd)` to be expanded to `CURDIR=/home/person/foo bar/test/`. This means that the shell would attempt to run the command `bar/test/` with the environment variable `CURDIR` set to `/home/person/foo`. This is due to [word splitting](https://www.gnu.org/software/bash/manual/html_node/Word-Splitting.html). (TL;DR the result of shell expansions should probably be quoted 99% of the time)
vargaz pushed a commit to vargaz/emsdk that referenced this pull request Nov 22, 2023
…923.1 (emscripten-core#220)

[main] Update dependencies from dotnet/arcade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants