Skip to content

Commit cc1b3ef

Browse files
authored
Error on unknown arguments passed to --activate (#1313)
See #1312
1 parent ef77dcc commit cc1b3ef

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

emsdk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3047,13 +3047,12 @@ def print_tools(t):
30473047
print('')
30483048

30493049
tools_to_activate = currently_active_tools()
3050-
args = [x for x in args if not x.startswith('--')]
30513050
for arg in args:
30523051
tool = find_tool(arg)
30533052
if tool is None:
30543053
tool = find_sdk(arg)
3055-
if tool is None:
3056-
error_on_missing_tool(arg)
3054+
if tool is None:
3055+
error_on_missing_tool(arg)
30573056
tools_to_activate += [tool]
30583057
if not tools_to_activate:
30593058
errlog('No tools/SDKs specified to activate! Usage:\n emsdk activate tool/sdk1 [tool/sdk2] [...]')

test/test_activation.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ try {
1515

1616
& "$repo_root/emsdk.ps1" install latest
1717

18-
$esc = '--%'
19-
& "$repo_root/emsdk.ps1" activate latest $esc $env:PERMANENT_FLAG $env:SYSTEM_FLAG
18+
& "$repo_root/emsdk.ps1" activate latest $env:PERMANENT_FLAG $env:SYSTEM_FLAG
2019

2120
if ($env:SYSTEM_FLAG) {
2221
$env_type = "Machine"

0 commit comments

Comments
 (0)