I want to look if cmake
is installed in my system with Raku.
cmake --version
at my command line gives:
cmake version 3.23.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).
One way I know (not sure if it is right or there are better ways) is:
my $cmake = shell('cmake --version').exitcode;
die "Aborting !, cmake installation is not present,
Install and try again," if $cmake != 0;
Is it a right way? Are there other better ways to handle it?
Its quite a generic question, it can help to test any other program.