Skip to content

Commit

Permalink
Merge pull request #886 from ranjib/path_not_set
Browse files Browse the repository at this point in the history
Check if ENV['PATH'] is set before using it
  • Loading branch information
jordansissel committed Apr 10, 2015
2 parents 0bd18ce + e7a69e3 commit d0b642a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fpm/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(":")
Expand Down

0 comments on commit d0b642a

Please sign in to comment.