77 "errors"
88 "fmt"
99
10- "github.com/urfave/cli"
1110 "google.golang.org/protobuf/encoding/protojson"
1211
1312 "github.com/smallstep/certificates/ca"
@@ -18,11 +17,6 @@ import (
1817 "github.com/smallstep/cli/internal/command"
1918)
2019
21- var provisionerFilterFlag = cli.StringFlag {
22- Name : "provisioner" ,
23- Usage : `The provisioner <name>` ,
24- }
25-
2620func retrieveAndUnsetProvisionerFlagIfRequired (ctx context.Context ) string {
2721 // when managing policies on the authority level there's no need
2822 // to select a provisioner, so the flag does not need to be unset.
@@ -33,11 +27,14 @@ func retrieveAndUnsetProvisionerFlagIfRequired(ctx context.Context) string {
3327 clictx := command .CLIContextFromContext (ctx )
3428 provisioner := clictx .String ("provisioner" )
3529
36- // unset the provisioner flag value , so that it's not used
30+ // unset the provisioner and issuer flag values , so that they're not used
3731 // automatically in token flows.
3832 if err := clictx .Set ("provisioner" , "" ); err != nil {
3933 panic (fmt .Errorf ("failed unsetting provisioner flag: %w" , err ))
4034 }
35+ if err := clictx .Set ("issuer" , "" ); err != nil {
36+ panic (fmt .Errorf ("failed unsetting issuer flag: %w" , err ))
37+ }
4138
4239 return provisioner
4340}
0 commit comments