-
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
feat: Deno.args now does not include script #3628
Conversation
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, one nitpick for a follow up PR
let script_args = if gs.flags.argv.len() >= 2 { | ||
gs.flags.argv.clone().split_off(2) | ||
} else { |
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.
I suspect this might not be working properly in REPL. flags.argv
should be refactored as well, to separately handle <script>
and <sciprt_args>
on Rust side.
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.
This conditional is to support the REPL. But I agree that flags.argv should be refactored.
Now, we need another API to get the script name. |
so, is this implemented in current Deno 1.0? how can I get the script name? |
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Previously Deno.args was ["script.js", "arg1", "arg2"] Now it is just ["arg1", "arg2"] BREAKING CHANGE
Fixes #2123
depends on #3630