justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

duckpuppy opened this issue · comments

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):

  • OS: macOS Monterey
  • Architecture: intel
  • Shell: zsh

Additional context
Bug was added with this commit: 14bfc26

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