Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
exit on empty profileList
Browse files Browse the repository at this point in the history
  • Loading branch information
martinnirtl committed Feb 9, 2020
1 parent c7b1d5b commit 52fc8b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/commands/profilecmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ var listCmd = &cobra.Command{
activeEnv := config.GetActiveEnv()
profileNames := config.GetProfilesNames(activeEnv)

if len(profileNames) == 0 {
fmt.Printf("No profiles in %s. Create one with %s.\n", utils.PrintCyan(activeEnv), utils.PrintCyan("dockma profile create"))
}

for _, profileName := range profileNames {
fmt.Printf("%s%s%s\n", chalk.Cyan, profileName, chalk.ResetColor)

Expand Down

0 comments on commit 52fc8b2

Please sign in to comment.