rushstack
rushstack copied to clipboard
[rush] --bypass-policy does not work with `rush add`
rush add
executes rush update
under the hood, but does not pass --bypass-policy flag to it.
Summary
Repro steps
rush add --bypass-policy -p ts-node --dev
OR
rush --bypass-policy add -p ts-node --dev
Expected result: It should bypass gitPolicy.
Actual result: It doesn't.
What are the issues that you experience and can be solved with adding --bypass-policy
to rush add ?
Also related to #2398
@apostolisms
What are the issues that you experience and can be solved with adding --bypass-policy to rush add ?
Umm, I don't understand what you're asking.
To re-word what I meant simply,
rush update --bypass-policy
works, but rush add --bypass-policy
doesn't.
I think the latter should work as well.
Also related to #2398
Maybe once #2398 is implemented, then #2397 might be naturally resolved when using env var.
However, there would be still a problem when not using env var, but the flag (--bypass-policy
).
Thanks.
I found that to add package using rush add command with a policy, use : rush add -p <packageName> -s; rush update --bypass-policy
. The -s
flag suppresses the warning caused by the add
command and the update succeeds.