Skip to content

Commit

Permalink
Switch to --verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
tashian committed Apr 13, 2021
1 parent 039e718 commit 8eead2a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions command/ssh/checkHost.go
Expand Up @@ -25,11 +25,11 @@ func checkHostCommand() cli.Command {
Usage: "checks if a certificate has been issued for a host",
UsageText: `**step ssh check-host** <hostname>
[**--ca-url**=<uri>] [**--root**=<file>]
[**--offline**] [**--ca-config**=<path>] [**--quiet**]`,
[**--offline**] [**--ca-config**=<path>] [**--verbose,-v**]`,
Description: `**step ssh check-host** checks if a certificate has been issued for a host.
This command prints "true" and returns a zero exit status if the host has a certificate.
Otherwise, it prints "false" and returns 1.
This command returns a zero exit status if the host has a certificate.
Otherwise, it returns 1.
## POSITIONAL ARGUMENTS
Expand All @@ -48,15 +48,15 @@ $ step ssh check-host internal.smallstep.com
flags.Offline,
flags.CaConfig,
cli.BoolFlag{
Name: "quiet",
Usage: `Silently return an exit code.`,
Name: "verbose, v",
Usage: `Return "true" or "false" in the terminal.`,
},
},
}
}

func checkHostAction(ctx *cli.Context) error {
isQuiet := ctx.Bool("quiet")
isVerbose := ctx.Bool("verbose")

if err := errs.NumberOfArguments(ctx, 1); err != nil {
return err
Expand Down Expand Up @@ -102,7 +102,7 @@ func checkHostAction(ctx *cli.Context) error {
"error checking ssh host eligibility")
}

if !isQuiet {
if isVerbose {
fmt.Println(resp.Exists)
}
if !resp.Exists {
Expand Down

0 comments on commit 8eead2a

Please sign in to comment.