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

bootstrap: do not expand process.argv[1] for snapshot entry points #47466

Merged
merged 1 commit into from Apr 10, 2023

Conversation

joyeecheung
Copy link
Member

In applications with entry points deserialized from snapshots, they don't need an additional CLI argument for the entry point script so process.argv[1] is going to be other user-defiend arguments. We could consider copying process.argv[0] as process.argv[1] like what we do for single executable applications, but for now just don't exapnd it so it's easier to backport to previous releases.

In applications with entry points deserialized from snapshots,
they don't need an additional CLI argument for the entry point script
so process.argv[1] is going to be other user-defiend arguments.
We could consider copying process.argv[0] as process.argv[1] like
what we do for single executable applications, but for now just
don't exapnd it so it's easier to backport to previous releases.
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Apr 7, 2023
@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

cc @nodejs/startup

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung joyeecheung added the review wanted PRs that need reviews. label Apr 9, 2023
@joyeecheung joyeecheung added the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Apr 10, 2023
@nodejs-github-bot nodejs-github-bot merged commit 209c803 into nodejs:main Apr 10, 2023
59 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 209c803

RafaelGSS pushed a commit that referenced this pull request Apr 13, 2023
In applications with entry points deserialized from snapshots,
they don't need an additional CLI argument for the entry point script
so process.argv[1] is going to be other user-defiend arguments.
We could consider copying process.argv[0] as process.argv[1] like
what we do for single executable applications, but for now just
don't exapnd it so it's easier to backport to previous releases.

PR-URL: #47466
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
In applications with entry points deserialized from snapshots,
they don't need an additional CLI argument for the entry point script
so process.argv[1] is going to be other user-defiend arguments.
We could consider copying process.argv[0] as process.argv[1] like
what we do for single executable applications, but for now just
don't exapnd it so it's easier to backport to previous releases.

PR-URL: #47466
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
In applications with entry points deserialized from snapshots,
they don't need an additional CLI argument for the entry point script
so process.argv[1] is going to be other user-defiend arguments.
We could consider copying process.argv[0] as process.argv[1] like
what we do for single executable applications, but for now just
don't exapnd it so it's easier to backport to previous releases.

PR-URL: nodejs#47466
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. review wanted PRs that need reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants