Skip to content

Commit

Permalink
Shorten error message, when configuration file was not found
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed May 8, 2017
1 parent e5d52e9 commit 2056bd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/perseus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func cmdAddRun(cmd *cobra.Command, args []string) error {
if len(args) >= 2 {
configFileArg := args[1]
if _, err := os.Stat(configFileArg); os.IsNotExist(err) {
return fmt.Errorf("Configuration file %s applied as a configuration file, but doesn't exists", configFileArg)
return fmt.Errorf("Configuration file %s applied, but doesn't exists", configFileArg)
}
viper.SetConfigFile(configFileArg)
}
Expand Down Expand Up @@ -240,7 +240,7 @@ func cmdMirrorRun(cmd *cobra.Command, args []string) error {
if len(args) >= 1 {
configFileArg := args[0]
if _, err := os.Stat(configFileArg); os.IsNotExist(err) {
return fmt.Errorf("Configuration file %s applied as a configuration file, but doesn't exists", configFileArg)
return fmt.Errorf("Configuration file %s applied, but doesn't exists", configFileArg)
}
viper.SetConfigFile(configFileArg)
}
Expand Down Expand Up @@ -308,7 +308,7 @@ func cmdUpdateRun(cmd *cobra.Command, args []string) error {
if len(args) >= 1 {
configFileArg := args[0]
if _, err := os.Stat(configFileArg); os.IsNotExist(err) {
return fmt.Errorf("Configuration file %s applied as a configuration file, but doesn't exists", configFileArg)
return fmt.Errorf("Configuration file %s applied, but doesn't exists", configFileArg)
}
viper.SetConfigFile(configFileArg)
}
Expand Down

0 comments on commit 2056bd2

Please sign in to comment.