Returning 1 on cat error

This commit is contained in:
Frederick F. Kautz IV
2015-04-23 20:26:02 -07:00
parent 1843bd7fc9
commit fcece3b238
+5 -5
View File
@@ -23,7 +23,7 @@ func runCatCmd(ctx *cli.Context) {
config, err := getMcConfig()
if err != nil {
log.Debug.Println(iodine.New(err, nil))
os.Exit(-1)
os.Exit(1)
}
// Convert arguments to URLs: expand alias, fix format...
@@ -32,10 +32,10 @@ func runCatCmd(ctx *cli.Context) {
switch iodine.ToError(err).(type) {
case errUnsupportedScheme:
log.Debug.Println(iodine.New(err, nil))
os.Exit(-1)
os.Exit(1)
default:
log.Debug.Println(iodine.New(err, nil))
os.Exit(-1)
os.Exit(1)
}
}
@@ -50,13 +50,13 @@ func runCatCmd(ctx *cli.Context) {
sourceConfig, err := getHostConfig(sourceURL)
if err != nil {
log.Debug.Println(iodine.New(err, nil))
os.Exit(-1)
os.Exit(1)
}
sourceURLConfigMap[sourceURL] = sourceConfig
if err != nil {
log.Debug.Println(iodine.New(err, nil))
os.Exit(-1)
os.Exit(1)
}
doCatCmd(mcClientManager{}, os.Stdout, sourceURLConfigMap, globalDebugFlag)
}