Fix emsdk activate breaking configuration file (#602)

Fixes: #587

> If nodejs is not installed by `emsdk`, the output ".emscripten" file by `emsdk activate` will look like this.
> 
> ```python
> NODE_JS = ''/usr/bin/nodejs''
> # too many quotes
> ```
> 
> `emcc` fails to execute by this syntax error.
> 
> I think fixing [this line](https://github.com/emscripten-core/emsdk/blob/1.40.1/emsdk.py#L1450) could be a solution.
> 
> ```python
> activated_config['NODE_JS'] = "'%s'" % node_fallback
> # the value will be quoted later again
> ```
This commit is contained in:
Reo
2020-09-01 00:27:03 +09:00
committed by GitHub
parent 9c27544f85
commit f6c9e453f8

View File

@@ -1452,7 +1452,7 @@ def generate_dot_emscripten(active_tools):
node_fallback = which('nodejs')
if not node_fallback:
node_fallback = 'node'
activated_config['NODE_JS'] = "'%s'" % node_fallback
activated_config['NODE_JS'] = node_fallback
for name, value in activated_config.items():
cfg += name + " = '" + value + "'\n"