Skip to content

Commit 2cabee9

Browse files
committed
conditionally add ~/.local/bin to PATH
1 parent 664a0af commit 2cabee9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,16 @@ runs:
384384
}
385385
^$'($env.UV_INSTALL_DIR)/uv' ...$uv_args ...$cmd
386386
387+
let local_bin = '~/.local/bin' | path expand
388+
if (
389+
('${{ runner.os }}' == 'Linux')
390+
and ($local_bin | path exists)
391+
and (not ($env.PATH | any {$in == $local_bin}))
392+
) {
393+
# add ~/.local/bin to PATH
394+
$"($local_bin)\n" | save --append $env.GITHUB_PATH
395+
}
396+
387397
- name: Run cpp-linter
388398
id: cpp-linter
389399
shell: nu {0}

0 commit comments

Comments
 (0)