mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
Redirect stderr for GOPATH check to /dev/null
Accounts for instances where `go` binary is not installed.
This commit is contained in:
parent
f140104e4a
commit
21d8fc6378
1 changed files with 1 additions and 1 deletions
|
@ -746,7 +746,7 @@ prompt_go_version() {
|
|||
local go_version
|
||||
local go_path
|
||||
go_version=$(go version 2>/dev/null | sed -E "s/.*(go[0-9.]*).*/\1/")
|
||||
go_path=$(go env GOPATH)
|
||||
go_path=$(go env GOPATH 2>/dev/null)
|
||||
|
||||
if [[ -n "$go_version" && "${PWD##$go_path}" != "$PWD" ]]; then
|
||||
"$1_prompt_segment" "$0" "$2" "green" "255" "$go_version"
|
||||
|
|
Loading…
Reference in a new issue