class Autodetect class_property print_autodetect : Bool = false def self.which(cmd : String) if Process.run("which", [ cmd ]).success? puts "#{cmd} installed" if print_autodetect true else puts "#{cmd} not installed" if print_autodetect false end end end