From d98d5c290eaeef77d85933ae264909de54be5066 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 4 Dec 2023 08:51:54 -0800 Subject: [PATCH] Error on unknown arguments passed to --activate See #1312 --- emsdk.py | 5 ++--- test/test_activation.ps1 | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/emsdk.py b/emsdk.py index d2142b0b86..52d1e51402 100644 --- a/emsdk.py +++ b/emsdk.py @@ -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] [...]') diff --git a/test/test_activation.ps1 b/test/test_activation.ps1 index 6aeb5e53a9..fdab08fb45 100644 --- a/test/test_activation.ps1 +++ b/test/test_activation.ps1 @@ -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"