1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Lazily load shellwords

ef6388656a
This commit is contained in:
David Rodríguez 2021-07-25 16:10:55 +02:00 committed by Hiroshi SHIBATA
parent 350f4a0b66
commit 095b5bbcc1
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
4 changed files with 8 additions and 7 deletions

View file

@ -1,7 +1,5 @@
# frozen_string_literal: true
require "shellwords"
module Bundler
class CLI::Open
attr_reader :options, :name
@ -19,6 +17,7 @@ module Bundler
else
path = spec.full_gem_path
Dir.chdir(path) do
require "shellwords"
command = Shellwords.split(editor) + [path]
Bundler.with_original_env do
system(*command)