summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/init.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/init.rb')
-rw-r--r--lib/bundler/cli/init.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index bc96507c29..246b9d6460 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -32,7 +32,7 @@ module Bundler
file << spec.to_gemfile
end
else
- File.open(File.expand_path("../templates/#{gemfile}", __dir__), "r") do |template|
+ File.open(File.expand_path("../templates/Gemfile", __dir__), "r") do |template|
File.open(gemfile, "wb") do |destination|
IO.copy_stream(template, destination)
end
@@ -45,7 +45,7 @@ module Bundler
private
def gemfile
- @gemfile ||= Bundler.preferred_gemfile_name
+ @gemfile ||= options[:gemfile] || Bundler.preferred_gemfile_name
end
end
end