Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/harbor/root/configurations/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ Make sure to run 'harbor config get' first to populate the local config file wit
default:
return fmt.Errorf("unsupported file type: %s, expected '.yaml/.yml' or '.json'", fileType)
}

if configurations == nil {
return fmt.Errorf("config file is empty or contains no valid configurations")
}
} else {
return fmt.Errorf("no config file specified")
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/harbor/root/context/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func SwitchContextCommand() *cobra.Command {
return fmt.Errorf("failed to update config: %w", err)
}
} else {
fmt.Println("context doesn't exist")
return fmt.Errorf("context '%s' doesn't exist", newActiveCredential)
}
} else {
res, err := prompt.GetActiveContextFromUser()
Expand Down
Empty file added empty.yaml
Empty file.
Loading