mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-25 17:45:39 +00:00
gomtree: ensure validating a populated hierarchy
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
d5aab78911
commit
2d227512a5
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue