Skip to content

Commit

Permalink
Merge branch 'main' into authkey-namespace-preload
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfont authored Oct 16, 2021
2 parents 985c6e7 + 5a7b377 commit 0b0f7db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/headscale/cli/preauthkeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ var createPreAuthKeyCmd = &cobra.Command{
}

var expirePreAuthKeyCmd = &cobra.Command{
Use: "expire",
Use: "expire KEY",
Short: "Expire a preauthkey",
Args: func(cmd *cobra.Command, args []string) error {
if len(args) < 1 {
Expand All @@ -153,6 +153,10 @@ var expirePreAuthKeyCmd = &cobra.Command{

k, err := h.GetPreAuthKey(n, args[0])
if err != nil {
if strings.HasPrefix(o, "json") {
JsonOutput(k, err, o)
return
}
log.Fatalf("Error getting the key: %s", err)
}

Expand Down

0 comments on commit 0b0f7db

Please sign in to comment.