Skip to content

Commit eb963ed

Browse files
committed
don't read dirs that not defaults or current stage
1 parent 7697e45 commit eb963ed

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

reader.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ func ReadConfigs(cfgPath string) ([]byte, error) {
4040
return nil
4141
}
4242

43-
if stageDir == "" || f.Name() == defaultStage || f.Name() == stage {
44-
stageDir = f.Name()
45-
}
46-
4743
if f.IsDir() {
48-
return nil
44+
if stageDir == "" || f.Name() == defaultStage || f.Name() == stage {
45+
stageDir = f.Name()
46+
return nil
47+
} else {
48+
return filepath.SkipDir
49+
}
4950
}
5051

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

0 commit comments

Comments
 (0)