Can I stop Bundler from adding RUBY VERSION to Gemfile.lock

前端 未结 3 1236
粉色の甜心
粉色の甜心 2021-01-17 11:21

Every time I run any gem command on the command line, Bundler insists on touching my Gemfile.lock file to add this line:

RUBY VERSION
   ruby 2.         


        
3条回答
  •  囚心锁ツ
    2021-01-17 11:52

    No, it can't be removed, at least in the version(s) of Bundler current as I write this.

    This block is added in the #to_lock method of Bundler::Definition. The only conditional it's wrapped in is if locked_ruby_version, and locked_ruby_version is a method which returns either the version defined in an existing lockfile (Gemfile.lock) or the system Ruby - Bundler tries very hard to avoid letting locked_ruby_version return a falsy value.

提交回复
热议问题