Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ See docs/process.md for more on how version tagging works.

6.0.5 (in development)
----------------------
- Revert #27397, which changes the way config keys such as NODE_JS we parsed
when reading the config file. This change broke emsdk installations that
contained spaces.

6.0.4 - 07/24/26
----------------
Expand Down
5 changes: 2 additions & 3 deletions test/test_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def test_config_listify(self):
cfg_file = os.path.join(config_dir, 'custom_config')

extra_config = '''
NODE_JS = '"/path/to/node with spaces" --with-arg --option="hello world"'
NODE_JS = '/path/to/node with spaces'
CLOSURE_COMPILER = ['/path/to/closure', '--legacy-flag']
'''
create_file(cfg_file, get_basic_config() + extra_config, absolute=True)
Expand All @@ -594,11 +594,10 @@ def get_em_config(var_name):
return self.run_process([EMCONFIG, var_name], stdout=PIPE, stderr=PIPE)

proc = get_em_config('NODE_JS')
self.assertEqual(proc.stdout.strip(), "['/path/to/node with spaces', '--with-arg', '--option=hello world']")
self.assertEqual(proc.stdout.strip(), "['/path/to/node with spaces']")

proc = get_em_config('CLOSURE_COMPILER')
self.assertEqual(proc.stdout.strip(), "['/path/to/closure', '--legacy-flag']")
self.assertContained('Found list-style config entry', proc.stderr)

def test_emcc_ports(self):
restore_and_set_up()
Expand Down
14 changes: 2 additions & 12 deletions tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import logging
import os
import shlex
import shutil
import sys

Expand Down Expand Up @@ -35,18 +34,9 @@


def listify(x):
if x is None:
if x is None or type(x) is list:
return x
if type(x) is list:
logger.warning(f'Found list-style config entry ({x}). Please use a single string with spaces between args.')

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kripken I know you weren't a fan of adding this warning in the first place so you'll be glad to see this reverted.

return x
# Use posix=True here so that quotes are handled as expected, but clear the
# `escape` list so that backslashes are not treated as escape chars (which
# would break windows pathnames that use backslashes).
lexer = shlex.shlex(x, posix=True)
lexer.escape = []
lexer.whitespace_split = True
return list(lexer)
return [x]


def normalize_config_settings():
Expand Down
Loading