diff --git a/lib/fpm/util.rb b/lib/fpm/util.rb index 3beece1d5e..0fd01e6fac 100644 --- a/lib/fpm/util.rb +++ b/lib/fpm/util.rb @@ -24,6 +24,8 @@ class ProcessFailed < StandardError; end # Is the given program in the system's PATH? def program_in_path?(program) + # return false if path is not set + return false unless ENV['PATH'] # Scan path to find the executable # Do this to help the user get a better error message. envpath = ENV["PATH"].split(":")