Skip to content

Commit e3308f8

Browse files
committed
conditionally add ~/.local/bin to PATH temporarily
1 parent 80be7c2 commit e3308f8

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

0 commit comments

Comments
 (0)