Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if ENV['PATH'] is set before using it #886

Merged
merged 1 commit into from Apr 10, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/fpm/util.rb
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