Skip to content

Commit

Permalink
Merge pull request #338 from replicatedhq/divolgin/better-errors
Browse files Browse the repository at this point in the history
Show better error message when dest dir exists
  • Loading branch information
divolgin committed Feb 19, 2020
2 parents 653efcc + 37dd1b1 commit fa7747f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/kots/cli/download.go
Expand Up @@ -23,7 +23,7 @@ func DownloadCmd() *cobra.Command {
RunE: func(cmd *cobra.Command, args []string) error {
v := viper.GetViper()

if len(args) == 0 {
if len(args) != 1 {
cmd.Help()
os.Exit(1)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/download/download.go
Expand Up @@ -110,7 +110,7 @@ func Download(appSlug string, path string, downloadOptions DownloadOptions) erro
} else {
log.FinishSpinner()
log.ActionWithoutSpinner("")
log.Info("Directory %s already exists. You can re-run this command with --overwrite to automatically overwrite it", path)
log.Error(errors.Errorf("Directory %s already exists. You can re-run this command with --overwrite to automatically overwrite it", path))
log.ActionWithoutSpinner("")
return errors.Errorf("directory already exists at %s", path)
}
Expand Down

0 comments on commit fa7747f

Please sign in to comment.