Skip to content

Commit

Permalink
Update segment-virtualenv.go
Browse files Browse the repository at this point in the history
zero length string comparison

Co-authored-by: Ville Skyttä <[email protected]>
  • Loading branch information
elebertus and scop authored Nov 28, 2023
1 parent dc30ce0 commit 03a5376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segment-virtualenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func segmentVirtualEnv(p *powerline) []pwl.Segment {
// or if calling with the prompt arg EnvBuilder
// otherwise env evaluates to an empty string, per return
// of ini.File.Section.Key
if pyEnv := cfg.Section("").Key("prompt").String(); len(pyEnv) > 0 {
if pyEnv := cfg.Section("").Key("prompt").String(); pyEnv != "" {
env = pyEnv
}
}
Expand Down

0 comments on commit 03a5376

Please sign in to comment.