From e7a69e3eb7fa99d248e9be12b29ed63b6f71af26 Mon Sep 17 00:00:00 2001 From: Ranjib Dey Date: Tue, 7 Apr 2015 17:50:30 -0700 Subject: [PATCH] Nothing can be found in PATH if its not set --- lib/fpm/util.rb | 2 ++ 1 file changed, 2 insertions(+) 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(":")