Skip to content

Commit

Permalink
Error on unknown arguments passed to --activate
Browse files Browse the repository at this point in the history
See #1312
  • Loading branch information
sbc100 committed Dec 7, 2023
1 parent ef77dcc commit d98d5c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions emsdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -3047,13 +3047,12 @@ def print_tools(t):
print('')

tools_to_activate = currently_active_tools()
args = [x for x in args if not x.startswith('--')]
for arg in args:
tool = find_tool(arg)
if tool is None:
tool = find_sdk(arg)
if tool is None:
error_on_missing_tool(arg)
if tool is None:
error_on_missing_tool(arg)
tools_to_activate += [tool]
if not tools_to_activate:
errlog('No tools/SDKs specified to activate! Usage:\n emsdk activate tool/sdk1 [tool/sdk2] [...]')
Expand Down
3 changes: 1 addition & 2 deletions test/test_activation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ try {

& "$repo_root/emsdk.ps1" install latest

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

if ($env:SYSTEM_FLAG) {
$env_type = "Machine"
Expand Down

0 comments on commit d98d5c2

Please sign in to comment.