fix: don't panic when env is empty

resolves #1907
This commit is contained in:
Jan De Dobbeleer 2022-03-12 11:05:40 +01:00 committed by Jan De Dobbeleer
parent 9a9721a38d
commit 11da129799

View file

@ -171,6 +171,9 @@ const (
)
func (segment *Segment) shouldIncludeFolder() bool {
if segment.env == nil {
return true
}
cwdIncluded := segment.cwdIncluded()
cwdExcluded := segment.cwdExcluded()
return cwdIncluded && !cwdExcluded