Skip to content

Commit

Permalink
Added skipping of export if already existing
Browse files Browse the repository at this point in the history
  • Loading branch information
hamstah committed Aug 30, 2016
1 parent 98efcfe commit 7d7b3c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ func ProcessSecret(client *api.Client, path string) Data {
func ProcessExport(export string, data map[string]Data) {
exportParts := strings.SplitN(export, "=", 2)
exportKey := exportParts[0]
if len(os.Getenv(exportKey)) != 0 {
fmt.Println(fmt.Sprintf("# %s is already set, ignoring", exportKey))
return
}

path := exportParts[1]

parts := strings.Split(path, ".")
Expand Down

0 comments on commit 7d7b3c6

Please sign in to comment.