mirror of
https://github.com/kennyp/asdf-golang.git
synced 2024-10-06 04:32:07 +08:00
Handle no go version set case (#132)
This commit is contained in:
parent
e6edd35384
commit
652c592264
@ -1,5 +1,5 @@
|
||||
function asdf_update_golang_env --on-event fish_prompt
|
||||
set --local go_path (asdf which go)
|
||||
set --local go_path (asdf which go 2>/dev/null)
|
||||
if test -n "$go_path"
|
||||
set --local full_path (builtin realpath "$go_path")
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
asdf_update_golang_env() {
|
||||
local go_path
|
||||
go_path="$(asdf which go)"
|
||||
go_path="$(asdf which go 2>/dev/null)"
|
||||
if [[ -n "${go_path}" ]]; then
|
||||
export GOROOT
|
||||
GOROOT="$(dirname "$(dirname "${go_path:A}")")"
|
||||
|
Loading…
Reference in New Issue
Block a user