-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix: validate integer values in Deno.exitCode
setter
#24068
Conversation
const code = NumberParseInt(value, 10); | ||
if (typeof code !== "number") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the code
variable is always a number, this validation was dead code.
@dsherret @bartlomieju please take a look! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for improving this API!
I guess we're blocked by WPT update? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
related: #23609
This PR includes the following:
cli/tests/unit/os_test.ts
and move its tests totests/unit/os_test.ts
Deno.exitCode
setter (no implicit type conversions)process.exitCode
to Node.js behavior (my env: v22.2.0, M1 Mac)