From 98b48015486bc638ba8f989af9285b73c413f9e6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <hello@mcornella.com>
Date: Wed, 17 Nov 2021 12:35:23 +0100
Subject: [PATCH] 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
---
 plugins/bundler/bundler.plugin.zsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index 6293dc28..c93d4869 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -40,7 +40,7 @@ bundle_install() {
   else
     local cores_num="$(nproc)"
   fi
-  bundle install --jobs="$cores_num" "$@"
+  BUNDLE_JOBS="$cores_num" bundle install "$@"
 }
 
 ## Gem wrapper