justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go
GNU General Public License v3.0
2.73k stars 268 forks source link

Fix for empty string value from pyvenv.cfg parsing #387

Closed elebertus closed 2 months ago

elebertus commented 1 year ago

*ini.File.Section.Key will return a zero-length value (string in this case since it's cast to string) which evaluates to an empty env and then envName value.

Here we maintain the same functionality but check if the value is empty, if empty retain the value from VIRTUAL_ENV for env.

This fixes https://github.com/justjanne/powerline-go/issues/373

w33dw0r7d commented 10 months ago

@elebertus @scop I think now is perfect time to merge this fix! Please!

elebertus commented 9 months ago

@scop good to go, pulled in your suggestion :+1:

scop commented 9 months ago

Cheers! However I think we'll need to wait for @justjanne to have a look, I have no commit access here.