Would have removed .. in heroku deploy log

后端 未结 5 967
无人及你
无人及你 2021-01-08 00:52

a few days ago I started to see

 Would have removed best_in_place (2.0.2)
 Would have removed thor (0.16.0)

in my heroku deploy output.

5条回答
  •  北恋
    北恋 (楼主)
    2021-01-08 01:40

    After some research, it appears this isn't a bug, but a feature!

    as you can see here https://github.com/carlhuda/bundler/pull/2237

    a dry_run flag has been implmented to act as if gems would have been removed and instead of removing them it just prints that

    the actual code is here

     if Bundler.settings[:dry_run]
              Bundler.ui.info "Would have removed #{output}"
            else
              Bundler.ui.info "Removing #{output}"
              FileUtils.rm_rf(gem_dir)
            end
    

    as you can see, if dry_run it prints thats. else it removes the gem

    so as this is a feature and not a bug, it is not going to be fixed any time soon. This leaves a question for heroku (which I am waiting for a reply) as to why they are using dry_run..

    Note for those that aren't aware - This bloats slug size

提交回复
热议问题