pwa-asset-generator icon indicating copy to clipboard operation
pwa-asset-generator copied to clipboard

fix(cli): support --no-sandbox

Open atjn opened this issue 1 year ago • 5 comments

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

atjn avatar Aug 24 '24 23:08 atjn

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

onderceylan avatar Mar 21 '25 23:03 onderceylan

@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.

atjn avatar Mar 27 '25 08:03 atjn

@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.

onderceylan avatar Mar 27 '25 10:03 onderceylan

@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 avatar Mar 27 '25 10:03 atjn

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.

atjn avatar Mar 27 '25 10:03 atjn