Skip to content
Permalink
Browse files

Check for fexistence before checking if executable

See #2756
  • Loading branch information...
ugexe authored and AlexDaniel committed Mar 10, 2019
1 parent 47e3444 commit 190a7148f2cf458488d0ac5420e513548d10f039
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Kernel.pm6
@@ -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';
}

0 comments on commit 190a714

Please sign in to comment.
You can’t perform that action at this time.