Skip to content

Commit 9b75ab1

Browse files
Pass subprocess arguments as array to provide minio version command regression
1 parent 9cfb2b8 commit 9b75ab1

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

bin/check-minio-update.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_latest_version(checkurl, platform)
7373
end
7474

7575
def get_local_version
76-
stdout, stderr, status = Open3.capture3({'PATH' => '/usr/local/bin:/usr/bin:/bin'}, 'minio --version', :unsetenv_others => true)
76+
stdout, stderr, status = Open3.capture3([{'PATH' => '/usr/local/bin:/usr/bin:/bin'}, 'minio --version', :unsetenv_others => true])
7777

7878
raise IOError, "Unable to gather local minio version: #{stderr}" unless status.success?
7979

spec/check-minio-update_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
before do
1010
stub_checksum_request
1111
allow(check).to(receive(:output))
12-
allow(Open3).to(receive(:capture3).and_return([stdout, stderr, double(:success? => success)]))
12+
allow(Open3).to(receive(:capture3).with(array_including('minio --version'))
13+
.and_return([stdout, stderr, double(:success? => success)]))
1314
end
1415

1516
let(:checksum_request) do

0 commit comments

Comments
 (0)