Skip to content

Commit

Permalink
allow lockfile to be a Pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
ccutrer committed Sep 19, 2023
1 parent be36576 commit f36d390
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/bundler/multilock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ def add_lockfile(lockfile = nil,
current = true if current.nil? && lockfile_definitions.empty? && lockfile.nil? && gemfile.nil?

# allow short-form lockfile names
lockfile = "Gemfile.#{lockfile}.lock" if lockfile && !(lockfile.include?("/") || lockfile.end_with?(".lock"))
if lockfile.is_a?(String) && !(lockfile.include?("/") || lockfile.end_with?(".lock"))
lockfile = "Gemfile.#{lockfile}.lock"
end
# if a gemfile was provided, but not a lockfile, infer the default lockfile for that gemfile
lockfile ||= "#{gemfile}.lock" if gemfile
# use absolute paths
Expand Down

0 comments on commit f36d390

Please sign in to comment.