Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Relish fails to load when there is no HOME variable set.

When executing relish under a CI environment without the HOME variable
set (centos in this case) relish will crash with this error:

/relish-0.5.1/lib/relish.rb:17:in
`expand_path': couldn't find HOME environment -- expanding `~'
(ArgumentError)
  from
/relish-0.5.1/lib/relish.rb:17
  from
/relish-0.5.1/lib/relish/command.rb:1:in
`require'
  from
/relish-0.5.1/lib/relish/command.rb:1
  from
/relish-0.5.1/bin/relish:5:in
`require'
  from
/relish-0.5.1/bin/relish:5
  from
/bin/relish:19:in
`load'
  from
/bin/relish:19
  • Loading branch information...
commit ad292c40ff3135e8f48e899d5a8609437df16bcb 1 parent 20f7d27
@AndrewVos AndrewVos authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/relish.rb
View
6 lib/relish.rb
@@ -7,14 +7,14 @@ def self.setting(name, value)
attr_writer name
class_eval %{
def #{name} # def global_options_file
- @#{name.to_s} ||= # @global_options_file ||=
- ENV['RELISH_#{name.to_s.upcase}'] || # ENV['RELISH_GLOBAL_OPTIONS_FILE'] ||
+ @#{name.to_s} ||= # @global_options_file ||=
+ ENV['RELISH_#{name.to_s.upcase}'] || # ENV['RELISH_GLOBAL_OPTIONS_FILE'] ||
'#{value}' # '~/.relish'
end # end
}
end
- setting :global_options_file, File.join(File.expand_path('~'), '.relish')
+ setting :global_options_file, File.join(File.expand_path('~'), '.relish') rescue "~/.relish"
setting :local_options_file, '.relish'
setting :default_host, 'api.relishapp.com'
setting :default_ssl, 'on'
Please sign in to comment.
Something went wrong with that request. Please try again.