Skip to content

Commit 79722ce

Browse files
authored
refactor: do not hide SSO commands/flags (#1218)
1 parent 341c3d7 commit 79722ce

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

pkg/app/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func configureKingpin(data *global.Data) *kingpin.Application {
303303
// IMPORTANT: `--debug` is a built-in Kingpin flag so we must use `debug-mode`.
304304
app.Flag("debug-mode", "Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting)").BoolVar(&data.Flags.Debug)
305305
// IMPORTANT: `--sso` causes a Kingpin runtime panic 🤦 so we use `enable-sso`.
306-
app.Flag("enable-sso", "Enable Single-Sign On (SSO) for current profile execution (see also: 'fastly sso')").Hidden().BoolVar(&data.Flags.SSO)
306+
app.Flag("enable-sso", "Enable Single-Sign On (SSO) for current profile execution (see also: 'fastly sso')").BoolVar(&data.Flags.SSO)
307307
app.Flag("non-interactive", "Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes").Short('i').BoolVar(&data.Flags.NonInteractive)
308308
app.Flag("profile", "Switch account profile for single command execution (see also: 'fastly profile switch')").Short('o').StringVar(&data.Flags.Profile)
309309
app.Flag("quiet", "Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive)").Short('q').BoolVar(&data.Flags.Quiet)

pkg/app/run_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ complete -F _fastly_bash_autocomplete fastly
5959
Name: "shell evaluate completion options",
6060
Args: args("--completion-bash"),
6161
WantOutput: `help
62+
sso
6263
acl
6364
acl-entry
6465
alerts

pkg/commands/profile/create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewCreateCommand(parent argparser.Registerer, g *global.Data, ssoCmd *sso.R
3939
c.CmdClause = parent.Command("create", "Create user profile")
4040
c.CmdClause.Arg("profile", "Profile to create (default 'user')").Default(profile.DefaultName).Short('p').StringVar(&c.profile)
4141
c.CmdClause.Flag("automation-token", "Expected input will be an 'automation token' instead of a 'user token'").BoolVar(&c.automationToken)
42-
c.CmdClause.Flag("sso", "Create an SSO-based token").Hidden().BoolVar(&c.sso)
42+
c.CmdClause.Flag("sso", "Create an SSO-based token").BoolVar(&c.sso)
4343
return &c
4444
}
4545

pkg/commands/profile/update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func NewUpdateCommand(parent argparser.Registerer, g *global.Data, ssoCmd *sso.R
3535
c.CmdClause = parent.Command("update", "Update user profile")
3636
c.CmdClause.Arg("profile", "Profile to update (defaults to the currently active profile)").Short('p').StringVar(&c.profile)
3737
c.CmdClause.Flag("automation-token", "Expected input will be an 'automation token' instead of a 'user token'").BoolVar(&c.automationToken)
38-
c.CmdClause.Flag("sso", "Update profile to use an SSO-based token").Hidden().BoolVar(&c.sso)
38+
c.CmdClause.Flag("sso", "Update profile to use an SSO-based token").BoolVar(&c.sso)
3939
return &c
4040
}
4141

pkg/commands/sso/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewRootCommand(parent argparser.Registerer, g *global.Data) *RootCommand {
4444
var c RootCommand
4545
c.Globals = g
4646
// FIXME: Unhide this command once SSO is GA.
47-
c.CmdClause = parent.Command("sso", "Single Sign-On authentication (defaults to current profile)").Hidden()
47+
c.CmdClause = parent.Command("sso", "Single Sign-On authentication (defaults to current profile)")
4848
c.CmdClause.Arg("profile", "Profile to authenticate (i.e. create/update a token for)").Short('p').StringVar(&c.profile)
4949
return &c
5050
}

pkg/global/global.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ type Flags struct {
231231
Profile string
232232
// Quiet silences all output except direct command output.
233233
Quiet bool
234-
// SSO enables to SSO authentication tokens for the current profile.
234+
// SSO enables SSO authentication tokens for the current profile.
235235
SSO bool
236236
// Token is an override for a profile (when passed SSO is disabled).
237237
Token string

0 commit comments

Comments
 (0)