fix(lang): ensure Go related env vars are correctly loaded

This commit is contained in:
2021-02-27 23:33:00 +00:00
parent affbe2e113
commit e74800b5cb
2 changed files with 7 additions and 12 deletions

View File

@@ -12,7 +12,13 @@
(exec-path-from-shell-variables '("PATH"
"MANPATH"
"TMPDIR"
"KUBECONFIG"))
"KUBECONFIG"
"GOPATH"
"GOBIN"
"GOROOT"
"GOPRIVATE"
"GOENV_GOPATH_PREFIX"
"GOENV_VERSION"))
(exec-path-from-shell-arguments '("-l"))
(exec-path-from-shell-check-startup-files nil)
(exec-path-from-shell-debug nil)

View File

@@ -51,17 +51,6 @@
(subword-mode +1))
:config
(when (not (getenv "GOPATH"))
(exec-path-from-shell-copy-env "GOPATH"))
(when (not (getenv "GOBIN"))
(exec-path-from-shell-copy-env "GOBIN"))
(when (not (getenv "GOROOT"))
(exec-path-from-shell-copy-env "GOROOT"))
(when (not (getenv "GOPRIVATE"))
(exec-path-from-shell-copy-env "GOPRIVATE"))
(when (not (getenv "GOENV_GOPATH_PREFIX"))
(exec-path-from-shell-copy-env "GOENV_GOPATH_PREFIX"))
(define-key 'help-command (kbd "G") 'godoc)
;; Ignore go test -c output files