Commit graph

4 commits

Author SHA1 Message Date
Qiming Xu
5e14987d65
Fix determining executable location in PATH (#8238) 2023-11-14 08:26:19 +00:00
Sam Coe
05bf29d88e
Introduce GH_PATH environment variable (#7025) 2023-03-07 11:30:10 +11:00
Eng Zer Jun
471cbea4fa
test: use t.Setenv to set env vars in tests (#6333)
This commit replaces `os.Setenv` with `t.Setenv` in tests. The
environment variable is automatically restored to its original value
when the test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.Setenv
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-09-26 08:46:02 +00:00
Mislav Marohnić
7387346196 Fix determining the current executable under Homebrew for Linux
We need to use `os.Lstat` instead of `os.Stat` if we are going to
manually inspect files for whether they are a symlink. On macOS, it
looks like `os.Stat` returns information about the symlink itself.
2022-06-20 15:25:29 +02:00