Skip to content

Commit 1bf17de

Browse files
Merge pull request #5 from aboutsource/fix/popen3_arguments
Restore regular unsplatted arguments for open3 subprocess
2 parents f5e2b47 + 2b0eb53 commit 1bf17de

2 files changed

Lines changed: 3 additions & 4 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' => ENV['PATH']}, 'minio --version', :unsetenv_others => true])
76+
stdout, stderr, status = Open3.capture3({ 'PATH' => ENV['PATH'] }, '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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
before do
1010
stub_checksum_request
1111
allow(check).to(receive(:output))
12-
allow(Open3).to(receive(:capture3).with(array_including('minio --version'))
13-
.and_return([stdout, stderr, double(:success? => success)]))
12+
allow(Open3).to(receive(:capture3).and_return([stdout, stderr, double(:success? => success)]))
1413
end
1514

1615
let(:checksum_request) do
@@ -81,7 +80,7 @@
8180
end
8281
end
8382

84-
context 'with release url not found' do ||
83+
context 'with release url not found' do
8584
let(:response) { { body: '404 Not Found', status: 404 } }
8685

8786
it 'should be unknown' do

0 commit comments

Comments
 (0)