Skip to content

Commit

Permalink
only warn about shellVarName not existing if it's been set.
Browse files Browse the repository at this point in the history
  • Loading branch information
kchiem committed May 5, 2021
1 parent b5a2519 commit c162128
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 c162128

Please sign in to comment.