1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 21:40:08 +00:00

Redirect stderr for GOPATH check to /dev/null

Accounts for instances where `go` binary is not installed.
This commit is contained in:
Jason Hutchinson 2017-04-12 17:09:23 -05:00 committed by GitHub
parent f140104e4a
commit 21d8fc6378

View file

@ -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"