Skip to content

Commit 855de59

Browse files
committed
compensate when input version specifies a path
1 parent a5e258b commit 855de59

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,18 @@ runs:
381381
print $"(ansi yellow)Using platform default clang tools \(version not specified)(ansi reset)"
382382
exit 0
383383
}
384-
let version = $version_str | into int
384+
let version = try {
385+
$version_str | into int
386+
} catch {
387+
print "Version is not an integer"
388+
if not ($version_str | path exists) {
389+
print "(ansi red)Error: Version must be an integer or a valid path to installed clang tools binaries(ansi reset)"
390+
exit 1
391+
} else {
392+
print $"(ansi yellow)Using custom clang tools installation at path: ($version_str)(ansi reset)"
393+
exit 0
394+
}
395+
}
385396
386397
$uv_args = [run --no-sync --project $action_path --directory (pwd)]
387398
if $verbosity {

0 commit comments

Comments
 (0)