aptly exits with 2 on command/flag parse error. #52

This commit is contained in:
Andrey Smirnov
2014-05-16 00:22:51 +04:00
parent 2cbb486f6b
commit 05a42f4cba
40 changed files with 104 additions and 32 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func aptlySnapshotCreate(cmd *commander.Command, args []string) error {
snapshot = deb.NewSnapshotFromPackageList(snapshotName, nil, packageList, "Created as empty")
} else {
cmd.Usage()
return err
return commander.ErrCommandError
}
err = context.CollectionFactory().SnapshotCollection().Add(snapshot)