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

feat: Deno.args now does not include script #3628

Merged
merged 5 commits into from
Jan 9, 2020
Merged

feat: Deno.args now does not include script #3628

merged 5 commits into from
Jan 9, 2020

Conversation

ry
Copy link
Member

@ry ry commented Jan 8, 2020

Fixes #2123

depends on #3630

@ry ry mentioned this pull request Jan 9, 2020
@ry ry requested a review from bartlomieju January 9, 2020 18:33
Copy link
Member

@bartlomieju bartlomieju left a 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

Comment on lines +44 to +46
let script_args = if gs.flags.argv.len() >= 2 {
gs.flags.argv.clone().split_off(2)
} else {
Copy link
Member

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.

Copy link
Member Author

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.

@Fenzland
Copy link
Contributor

Now, we need another API to get the script name.

@t829702
Copy link

t829702 commented May 20, 2020

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?

caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
Previously Deno.args was ["script.js", "arg1", "arg2"]
Now it is just ["arg1", "arg2"]
BREAKING CHANGE
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.

Arguments array - should the program name be included?
4 participants