Skip to content

Commit

Permalink
don't read dirs that not defaults or current stage
Browse files Browse the repository at this point in the history
  • Loading branch information
smgladkovskiy committed Jul 13, 2020
1 parent 7697e45 commit eb963ed
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ func ReadConfigs(cfgPath string) ([]byte, error) {
return nil
}

if stageDir == "" || f.Name() == defaultStage || f.Name() == stage {
stageDir = f.Name()
}

if f.IsDir() {
return nil
if stageDir == "" || f.Name() == defaultStage || f.Name() == stage {
stageDir = f.Name()
return nil
} else {
return filepath.SkipDir
}
}

if filepath.Ext(f.Name()) == ".yaml" && (stageDir == defaultStage || stageDir == stage) {
Expand Down

0 comments on commit eb963ed

Please sign in to comment.