mirror of
https://github.com/psviderski/uncloud.git
synced 2026-11-10 12:44:16 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dac194752a | ||
|
|
df493d0b60 | ||
|
|
7f68e1f838 | ||
|
|
fab2a20242 | ||
|
|
bb8fb3a380 | ||
|
|
e50c7a0cf6 | ||
|
|
c16e452439 |
+10
-1
@@ -22,6 +22,15 @@ func NewShowCommand() *cobra.Command {
|
||||
}
|
||||
|
||||
func show(uncli *cli.CLI) error {
|
||||
fmt.Println(uncli.ContextOverrideOrCurrent())
|
||||
// discard errors, only show the current context, otherwise nothing
|
||||
if uncli.Config == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if len(uncli.Config.Contexts) == 0 {
|
||||
return nil
|
||||
}
|
||||
fmt.Println(uncli.Config.CurrentContext)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user