Skip to content

Commit d1963bf

Browse files
Use deprecation helper for deprecation warning
1 parent 660def5 commit d1963bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bundler/lib/bundler/definition.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ def lock(file_or_preserve_unknown_sections = false, preserve_unknown_sections_or
334334
"Instead, instantiate a new definition passing `#{target_lockfile}`, and call `lock` without a file argument on that definition"
335335
end
336336

337-
warn "Passing a file to `Definition#lock` is deprecated. #{suggestion}"
337+
msg = "`Definition#lock` was passed a target file argument. #{suggestion}"
338+
339+
Bundler::SharedHelpers.major_deprecation 2, msg
338340
end
339341

340342
write_lock(target_lockfile, preserve_unknown_sections)

0 commit comments

Comments
 (0)