Exit if there are no items to retrieve in one-shot mode

This commit is contained in:
James Munnelly 2017-06-21 19:36:13 +01:00
parent 2c07214d3d
commit 643f7ba6a9

View file

@ -71,6 +71,10 @@ func main() {
toProcess := options.resources.items
toProcessLock := &sync.Mutex{}
if options.oneShot && len(toProcess) == 0 {
glog.Infof("nothing to retrieve from vault. exiting...")
os.Exit(0)
}
// step: we simply wait for events i.e. secrets from vault and write them to the output directory
for {
select {