@@ -658,7 +658,7 @@ func loginCmdDef() *cli.Command {
658658 & cli.StringFlag {Name : "scope" },
659659 & cli.StringFlag {Name : "workspace-id" },
660660 & cli.BoolFlag {Name : "debug" },
661- & cli.BoolFlag {Name : "no-set-active " },
661+ & cli.BoolFlag {Name : "no-activate " },
662662 },
663663 }},
664664 }
@@ -1016,27 +1016,27 @@ func TestAuthLoginActivatesExplicitProfile(t *testing.T) {
10161016 assert .Equal (t , "b" , strings .TrimSpace (string (mustRead (t , config .ActiveConfigPath (dir )))))
10171017}
10181018
1019- // TestAuthLoginNoSetActive guards the --no-set-active opt-out: credentials
1019+ // TestAuthLoginNoActivate guards the --no-activate opt-out: credentials
10201020// must still be written, but active_config must not be created or
10211021// retargeted regardless of whether --profile is given via flag or
10221022// ANTHROPIC_PROFILE env source.
1023- func TestAuthLoginNoSetActive (t * testing.T ) {
1023+ func TestAuthLoginNoActivate (t * testing.T ) {
10241024 t .Run ("retarget skipped, prior active preserved" , func (t * testing.T ) {
10251025 dir := t .TempDir ()
10261026 t .Setenv ("ANTHROPIC_CONFIG_DIR" , dir )
10271027 clearEnv (t , "ANTHROPIC_PROFILE" )
10281028 require .NoError (t , config .SetActiveProfile (dir , "a" ))
10291029
10301030 srv := newTokenServer (t , tokenResponse {AccessToken : "tok" , RefreshToken : "rt" , ExpiresIn : 600 })
1031- _ , stderr , err := driveLoginErr (t , srv .URL , "--profile" , "b" , "--no-set-active " )
1031+ _ , stderr , err := driveLoginErr (t , srv .URL , "--profile" , "b" , "--no-activate " )
10321032 require .NoError (t , err )
10331033
10341034 assert .Equal (t , "a" , strings .TrimSpace (string (mustRead (t , config .ActiveConfigPath (dir )))),
1035- "--no-set-active must not retarget active_config" )
1035+ "--no-activate must not retarget active_config" )
10361036 assert .FileExists (t , config .ProfileCredentialsPath (dir , "b" ),
10371037 "credentials/<profile>.json must still be written" )
10381038 assert .Contains (t , stderr ,
1039- `→ active profile unchanged (still "a"; --no-set-active in effect)` ,
1039+ `→ active profile unchanged (still "a"; --no-activate in effect)` ,
10401040 "stderr must announce the opt-out skip with the prior active value" )
10411041 })
10421042
@@ -1046,27 +1046,27 @@ func TestAuthLoginNoSetActive(t *testing.T) {
10461046 clearEnv (t , "ANTHROPIC_PROFILE" )
10471047
10481048 srv := newTokenServer (t , tokenResponse {AccessToken : "tok" , RefreshToken : "rt" , ExpiresIn : 600 })
1049- _ , stderr , err := driveLoginErr (t , srv .URL , "--profile" , "c" , "--no-set-active " )
1049+ _ , stderr , err := driveLoginErr (t , srv .URL , "--profile" , "c" , "--no-activate " )
10501050 require .NoError (t , err )
10511051
10521052 assert .NoFileExists (t , config .ActiveConfigPath (dir ),
1053- "--no-set-active must not create active_config when absent" )
1053+ "--no-activate must not create active_config when absent" )
10541054 assert .NotContains (t , stderr , "active profile unchanged" ,
10551055 "no opt-out skip message when there was no prior active" )
10561056 })
10571057
1058- t .Run ("env-source profile honors --no-set-active " , func (t * testing.T ) {
1058+ t .Run ("env-source profile honors --no-activate " , func (t * testing.T ) {
10591059 dir := t .TempDir ()
10601060 t .Setenv ("ANTHROPIC_CONFIG_DIR" , dir )
10611061 require .NoError (t , config .SetActiveProfile (dir , "x" ))
10621062 t .Setenv ("ANTHROPIC_PROFILE" , "y" )
10631063
10641064 srv := newTokenServer (t , tokenResponse {AccessToken : "tok" , RefreshToken : "rt" , ExpiresIn : 600 })
1065- _ , _ , err := driveLoginErr (t , srv .URL , "--no-set-active " )
1065+ _ , _ , err := driveLoginErr (t , srv .URL , "--no-activate " )
10661066 require .NoError (t , err )
10671067
10681068 assert .Equal (t , "x" , strings .TrimSpace (string (mustRead (t , config .ActiveConfigPath (dir )))),
1069- "--no-set-active honored when profile resolves via ANTHROPIC_PROFILE" )
1069+ "--no-activate honored when profile resolves via ANTHROPIC_PROFILE" )
10701070 assert .FileExists (t , config .ProfileCredentialsPath (dir , "y" ))
10711071 })
10721072}
0 commit comments