lib/cliver/detector.rb in cliver-0.2.0 vs lib/cliver/detector.rb in cliver-0.2.1

- old
+ new

@@ -39,9 +39,16 @@ # @param executable_path [String] - the path to the executable to test # @return [String] - should be contain {Gem::Version}-parsable # version number. def detect_version(executable_path) output = shell_out_and_capture version_command(executable_path).shelljoin + if $?.exitstatus == 127 + raise Cliver::Dependency::NotFound.new( + "Could not find an executable at given path '#{executable_path}'." + + "If this path was not specified explicitly, it is probably a " + + "bug in [Cliver](https://github.com/yaauie/cliver/issues)." + ) + end output[version_pattern] end # This is the interface that any detector must have. # If not overridden, returns a proc that wraps #detect_version