Skip to content

Commit 2d780d8

Browse files
committed
conditionally add ~/.local/bin to PATH temporarily
1 parent 048ce58 commit 2d780d8

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
@@ -428,5 +428,15 @@ runs:
428428
$uv_args = $uv_args | append '-v'
429429
}
430430
431+
let local_bin = '~/.local/bin' | path expand
432+
let tmp_path = if (
433+
('${{ runner.os }}' == 'Linux')
434+
and ($local_bin | path exists)
435+
and (not ($env.PATH | any {$in == $local_bin}))
436+
) {
437+
# add ~/.local/bin to PATH (temporarily)
438+
$env.PATH = $env.PATH | append $local_bin
439+
}
440+
431441
print $"\n(ansi purple)Running cpp-linter(ansi reset)"
432442
^$'($env.UV_INSTALL_DIR)/uv' ...$uv_args cpp-linter ...$args

0 commit comments

Comments
 (0)