Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit 315a2fe

Browse files
committed
Fix locating gem when bundle show process outputs warnings
1 parent 43efb6b commit 315a2fe

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bundler.el

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -187,19 +187,16 @@ found."
187187
"bundle info --path"))
188188
(bundler-stdout
189189
(shell-command-to-string
190-
(format "%s %s" cmd (shell-quote-argument gem-name))))
191-
(remote (file-remote-p default-directory)))
190+
(format "%s %s" cmd (shell-quote-argument gem-name)))))
192191
(cond
193192
((string-match "Could not locate Gemfile" bundler-stdout)
194193
'no-gemfile)
195194
((string-match "Could not find " bundler-stdout)
196195
nil)
197196
(t
198-
(concat remote
199-
(replace-regexp-in-string
200-
"Resolving dependencies...\\|The dependency .* will be unused by .*$\\|\n" ""
201-
bundler-stdout)
202-
"/")))))
197+
(seq-find
198+
(lambda (line) (string-match-p "^\\/" line))
199+
(reverse (split-string bundler-stdout "[\n]")))))))
203200

204201
(defvar bundle-gem-list-cache
205202
(make-hash-table)

0 commit comments

Comments
 (0)