Compare commits

..
7 Commits
+10 -1
View File
@@ -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
}