Make use of ENV.fetch

This commit is contained in:
Henne Vogelsang 2022-05-06 14:27:15 +02:00
parent 200d188af2
commit 36b23ce25d
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
27 changed files with 51 additions and 53 deletions

View file

@ -18,7 +18,7 @@ m = Module.new do
end
def env_var_version
ENV['BUNDLER_VERSION']
ENV.fetch('BUNDLER_VERSION', nil)
end
def cli_arg_version
@ -40,7 +40,7 @@ m = Module.new do
end
def gemfile
gemfile = ENV['BUNDLE_GEMFILE']
gemfile = ENV.fetch('BUNDLE_GEMFILE', nil)
return gemfile if gemfile && !gemfile.empty?
File.expand_path('../../Gemfile', __FILE__)