mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Show JSON when error on expire key (fixes #162)
This commit is contained in:
parent
abfb1791f1
commit
91d135e069
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue