We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 63a4c59 + 86282bd commit 05c7a89Copy full SHA for 05c7a89
lib/jetpants/host.rb
@@ -823,7 +823,10 @@ def set_io_scheduler(name, device='sda')
823
end
824
825
def has_installed(program_name)
826
- not (ssh_cmd "which #{program_name}" =~ /no #{program_name} in /).nil?
+ # The regex will match if the program is missing,
827
+ # thusly: no match means it is installed
828
+ # thusly: nil means it is present
829
+ (ssh_cmd("which #{program_name}") =~ /no #{program_name} in /).nil?
830
831
832
# Confirms that the specified binary is installed and on the shell path.
0 commit comments