pwa-asset-generator
pwa-asset-generator copied to clipboard
fix(cli): support --no-sandbox
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
Hey @atjn, v7 introduces PAG_USE_NO_SANDBOX env var, in addition to the no-sandbox flag. Do we still need this PR?
@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 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 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.
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.