Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions aws_lambda_builders/workflows/ruby_bundler/bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ def run(self, args, cwd=None):

p = self.osutils.popen(invoke_bundler, stdout=self.osutils.pipe, stderr=self.osutils.pipe, cwd=cwd)

out, err = p.communicate()
out, _ = p.communicate()

if p.returncode != 0:
raise BundlerExecutionError(message=err.decode("utf8").strip())
# Bundler has relevant information in stdout, not stderr.
raise BundlerExecutionError(message=out.decode("utf8").strip())

return out.decode("utf8").strip()
2 changes: 1 addition & 1 deletion tests/unit/workflows/ruby_bundler/test_bundler.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_returns_popen_out_decoded_if_retcode_is_0(self):

def test_raises_BundlerExecutionError_with_err_text_if_retcode_is_not_0(self):
self.popen.returncode = 1
self.popen.err = b"some error text\n\n"
self.popen.out = b"some error text\n\n"
with self.assertRaises(BundlerExecutionError) as raised:
self.under_test.run(["install", "--without", "development", "test"])
self.assertEqual(raised.exception.args[0], "Bundler Failed: some error text")
Expand Down