Skip to content

Commit

Permalink
Merge pull request #314 from kchiem/main
Browse files Browse the repository at this point in the history
only warn about shellVarName not existing if it's been set
  • Loading branch information
justjanne authored Jun 18, 2021
2 parents 625b6f7 + c162128 commit ad0387c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion segment-shellvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ func segmentShellVar(p *powerline) []pwl.Segment {
varContent, varExists := os.LookupEnv(shellVarName)

if !varExists {
warn("Shell variable " + shellVarName + " does not exist.")
if shellVarName != "" {
warn("Shell variable " + shellVarName + " does not exist.")
}
return []pwl.Segment{}
}

Expand Down

0 comments on commit ad0387c

Please sign in to comment.