diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-02 00:41:49 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-01-04 22:17:48 +0100 |
commit | 60dc407ddb0dcf6b2bed6c9ed3d509f741b3972f (patch) | |
tree | b3b0b22d6601f334e4a40348acb43b005b614501 | |
parent | d4c9e52709f4a2fb1cab8eac932d992d1aeccbd6 (diff) | |
download | bundler-60dc407ddb0dcf6b2bed6c9ed3d509f741b3972f.tar.gz |
Simplify `bundle` helper
-rw-r--r-- | spec/support/helpers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index e9c9e766cf..674a31a780 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -92,7 +92,7 @@ module Spec run(cmd, *args) end - def bundle(cmd, options = {}) + def bundle(cmd, options = {}, &block) with_sudo = options.delete(:sudo) sudo = with_sudo == :preserve_env ? "sudo -E" : "sudo" if with_sudo @@ -140,7 +140,7 @@ module Spec end.join cmd = "#{sudo} #{Gem.ruby} #{load_path_str} #{requires_str} #{bundle_bin} #{cmd}#{args}" - sys_exec(cmd, env) {|i, o, thr| yield i, o, thr if block_given? } + sys_exec(cmd, env, &block) end bang :bundle |