Skip to content

fix(cli): support --no-sandbox - #1018

Open
atjn wants to merge 1 commit into
masterfrom
no-sandbox
Open

fix(cli): support --no-sandbox#1018
atjn wants to merge 1 commit into
masterfrom
no-sandbox

Conversation

@atjn

@atjn atjn commented Aug 24, 2024

Copy link
Copy Markdown
Collaborator

Support --no-sandbox as it is written in the docs. Currently, it is only possible to activate this option with -n or --noSandbox.

Fixes #1003

@onderceylan

Copy link
Copy Markdown
Collaborator

Hey @atjn, v7 introduces PAG_USE_NO_SANDBOX env var, in addition to the no-sandbox flag. Do we still need this PR?

@atjn

atjn commented Mar 27, 2025

Copy link
Copy Markdown
Collaborator Author

@onderceylan the docs currently say that you can set the --no-sandbox flag, but that does not work. This PR fixes the problem by supporting the --no-sandbox flag. If you don't want to support the flag, that is fine. Then you need to edit the documentation to remove any references to that flag.

@onderceylan

Copy link
Copy Markdown
Collaborator

@atjn we should support the flag. But I was under the impression that meow converts the flags that have dash to camelCase.

Note that flags are always defined using a camel-case key (myKey), but will match arguments in kebab-case (--my-key).

We should not introduce another flag to fix the reported issue, but try to make --no-sandbox work instead/in addition to --noSandbox.

@atjn

atjn commented Mar 27, 2025

Copy link
Copy Markdown
Collaborator Author

@onderceylan the problem is that --no-sandbox is handled differently in meow, it means --sandbox=false. So you need to introduce the --sandbox flag to properly parse it.

If you don't want to introduce a new flag, you need to replace meow with something that allows --no unmodified, or you need to rename the flag to something that meow does not auto-transform.

At least that is how I remember it, I made this PR more than 6 months ago, so maybe I am forgetting some details.

@atjn

atjn commented Mar 27, 2025

Copy link
Copy Markdown
Collaborator Author

In this PR, I am adding the --sandbox flag and keeping the --no-sandbox flag for backwards-compatibility. Then in a future semver-major release, you can remove the --no-sandbox flag.

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.

--no-sandbox doesn't work, but -n or --noSandbox does

2 participants