Skip to content

Commit

Permalink
ci: show the PATH too
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Aug 19, 2024
1 parent 8ce92f2 commit aa0ca9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v2

- name: Check GO env variables
run: go env
run: go env && v -e 'import os; os.getenv("PATH").split(os.path_delimiter).map(dump(it))'

- name: Check code formatting
run: |
Expand Down
11 changes: 8 additions & 3 deletions main.v
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,14 @@ fn ensure_asty_is_installed() ! {
return error('Failed to find Go. Visit https://go.dev/dl/ to see instructions, on how to install it.')
}
gopath_bin := os.join_path(gopath_res.output.trim_space(), '/bin')
os.setenv('PATH', os.getenv('PATH') + if os.user_os() == 'windows' { ';' } else { ':' } +
gopath_bin, true)

os.setenv('GOBIN', gopath_bin, true)
os.setenv('PATH', os.getenv('PATH') + os.path_delimiter + gopath_bin, true)
if !os.exists(gopath_bin) {
os.mkdir_all(gopath_bin)!
}
if _ := os.find_abs_path_of_executable(asty_executable_name) {
return
}
// Check if asty is installed:
asty_installed := os.system('go list -m -json github.com/asty-org/asty@latest > /dev/null 2>&1') == 0
if !asty_installed {
Expand Down

0 comments on commit aa0ca9c

Please sign in to comment.