Skip to content

Error on unknown arguments passed to emsdk activate#1313

Merged
sbc100 merged 1 commit intomainfrom
error_on_bad_args
Dec 8, 2023
Merged

Error on unknown arguments passed to emsdk activate#1313
sbc100 merged 1 commit intomainfrom
error_on_bad_args

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Dec 4, 2023

See #1312

@sbc100 sbc100 force-pushed the error_on_bad_args branch from e78ad5f to d98d5c2 Compare December 7, 2023 00:11
@sbc100 sbc100 changed the title Error on unknown arguments passed to --activate Error on unknown arguments passed to emsdk activate Dec 7, 2023
@sbc100 sbc100 requested a review from dschuff December 7, 2023 00:16
@sbc100 sbc100 enabled auto-merge (squash) December 7, 2023 00:52
@sbc100
Copy link
Copy Markdown
Collaborator Author

sbc100 commented Dec 7, 2023

ptal

Copy link
Copy Markdown
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

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

oh oops, I left a comment and didn't submit it...

Comment thread emsdk.py
if tool is None:
error_on_missing_tool(arg)
if tool is None:
error_on_missing_tool(arg)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

so this means that args of the form --arg will now go through this missing tool logic. Does it print a message that makes sense for non-tool 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.

Yes, you will not see no tool found: --arg rather than silently ignoring it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right sorry, I guess what I meant was, should the error message be generalized to something like "unknown argument or no tool found by that name", since the error could now be either one of those cases.

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.

other command like emsdk install already report error: tool or SDK not found: '--foo'.. we could perhaps make that nicer, but that seems separate (and less important?) to ignoring args.

Copy link
Copy Markdown
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

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

makes sense, I don't want to block this PR, just wanted to bring it up.

@sbc100 sbc100 merged commit cc1b3ef into main Dec 8, 2023
@sbc100 sbc100 deleted the error_on_bad_args branch December 8, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants