Exit if there are no items to retrieve in one-shot mode
This commit is contained in:
parent
2c07214d3d
commit
643f7ba6a9
4
main.go
4
main.go
|
@ -71,6 +71,10 @@ func main() {
|
||||||
|
|
||||||
toProcess := options.resources.items
|
toProcess := options.resources.items
|
||||||
toProcessLock := &sync.Mutex{}
|
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
|
// step: we simply wait for events i.e. secrets from vault and write them to the output directory
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|
Reference in a new issue