Skip to content

Commit

Permalink
Check for fexistence before checking if executable
Browse files Browse the repository at this point in the history
See #2756
  • Loading branch information
ugexe authored and AlexDaniel committed Mar 17, 2019
1 parent 47e3444 commit 190a714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Kernel.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Kernel does Systemic {
has Bool $!has_uname;

method !uname($opt) {
$!has_uname //= "/bin/uname".IO.x || "/usr/bin/uname".IO.x;
$!has_uname //= ("/bin/uname", "/usr/bin/uname").first({ .IO.e && .IO.x });
$!has_uname ?? qqx/uname $opt/.chomp !! 'unknown';
}

Expand Down

0 comments on commit 190a714

Please sign in to comment.