Skip to content

Commit

Permalink
minor: turn off pterm when typing
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <[email protected]>
  • Loading branch information
yjinjo committed Nov 29, 2024
1 parent 584325e commit 3e61002
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func init() {
}
rootCmd.AddGroup(AvailableCommands)

if len(os.Args) > 1 && os.Args[1] == "__complete" {
pterm.DisableColor()
}

// Skip dynamic service loading for config init commands
if len(os.Args) >= 3 && os.Args[1] == "config" && os.Args[2] == "init" {
// Skip dynamic service loading for initialization
Expand Down Expand Up @@ -168,7 +172,7 @@ func loadConfig() (*Config, error) {
// If main config doesn't have what we need, try cache config
if endpoint == "" || token == "" {
cacheV := viper.New()

cacheV.SetConfigFile(cacheConfigFile)
if err := cacheV.ReadInConfig(); err == nil {
// If no current environment set, try to get it from cache config
Expand Down

0 comments on commit 3e61002

Please sign in to comment.