Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on unknown arguments passed to emsdk activate #1313

Merged
merged 1 commit into from
Dec 8, 2023
Merged

Conversation

sbc100
Copy link
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
Collaborator Author

sbc100 commented Dec 7, 2023

ptal

Copy link
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...

if tool is None:
error_on_missing_tool(arg)
if tool is None:
error_on_missing_tool(arg)
Copy link
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
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
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
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
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
10 checks passed
@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