1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-22 16:25:38 +00:00

Merge pull request #17 from vbatts/improve_flag_branches

gomtree: ensure validating a populated hierarchy
This commit is contained in:
Vincent Batts 2016-07-13 22:26:36 -04:00 committed by GitHub
commit 3dc8a31929

View file

@ -90,7 +90,7 @@ func main() {
return return
} }
dh.WriteTo(os.Stdout) dh.WriteTo(os.Stdout)
} else { } else if dh != nil {
// else this is a validation // else this is a validation
res, err := mtree.Check(rootPath, dh, currentKeywords) res, err := mtree.Check(rootPath, dh, currentKeywords)
if err != nil { if err != nil {
@ -104,6 +104,11 @@ func main() {
fmt.Println(failure) fmt.Println(failure)
} }
} }
} else {
log.Println("neither validating or creating a manifest. Please provide additional arguments")
isErr = true
defer os.Exit(1)
return
} }
} }