rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush] --bypass-policy does not work with `rush add`

Open jjangga0214 opened this issue 4 years ago • 3 comments

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.

jjangga0214 avatar Dec 15 '20 13:12 jjangga0214

What are the issues that you experience and can be solved with adding --bypass-policy to rush add ?

Also related to #2398

apostolisms avatar Jan 07 '21 19:01 apostolisms

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

jjangga0214 avatar Jan 08 '21 03:01 jjangga0214

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.

maghirardelli avatar Aug 18 '22 19:08 maghirardelli