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

Node segment shows up all the time if `node` is in the path. #356

Open duckpuppy opened 2 years ago

duckpuppy commented 2 years ago

Describe the bug If node is in the current executable search path, the node segment shows the node version even if not in a node project.

To Reproduce Steps to reproduce the behavior:

  1. Add node executable to system search path
  2. Enable node segment in powerline-go

Expected behavior Node segment should only show up when in a node project (ie. when there's also a package version)

Environment (please complete the following information):

Additional context Bug was added with this commit: https://github.com/justjanne/powerline-go/commit/14bfc26b16a860d78703fb94131bf05fa14610a4

The segment should not be visible unless there's also a package version to display.