98b48015486bc638ba8f989af9285b73c413f9e6

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix(bundler): use BUNDLE_JOBS in `bi` to avoid config file change

When calling `bundle install` with `--jobs=<n>`, bundle persists this
argument in `.bundle/config`. If we run `BUNDLE_JOBS=<n> bundle install`
instead, this is not persisted.

Fixes #10425

Diff

 1diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
 2index 6293dc28aee0da689cb37e849c1801d009ce7e97..c93d4869ea0a61722d8692d51962d8eb01bf9a9a 100644
 3--- a/plugins/bundler/bundler.plugin.zsh
 4+++ b/plugins/bundler/bundler.plugin.zsh
 5@@ -40,7 +40,7 @@ bundle_install() {
 6   else
 7     local cores_num="$(nproc)"
 8   fi
 9-  bundle install --jobs="$cores_num" "$@"
10+  BUNDLE_JOBS="$cores_num" bundle install "$@"
11 }
12 
13 ## Gem wrapper