diff --git a/samcli/lib/samlib/cloudformation_command.py b/samcli/lib/samlib/cloudformation_command.py index 93914827ad..dd3953bc92 100644 --- a/samcli/lib/samlib/cloudformation_command.py +++ b/samcli/lib/samlib/cloudformation_command.py @@ -47,4 +47,4 @@ def find_executable(execname): except OSError as ex: LOG.debug("Unable to find executable %s", name, exc_info=ex) - raise OSError("Unable to find AWS CLI installation under following names: {}".format(options)) + raise OSError("Cannot find AWS CLI installation, was looking at executables with names: {}".format(options)) diff --git a/tests/unit/lib/samlib/test_cloudformation_command.py b/tests/unit/lib/samlib/test_cloudformation_command.py index 7aa3248529..1f058a5df1 100644 --- a/tests/unit/lib/samlib/test_cloudformation_command.py +++ b/tests/unit/lib/samlib/test_cloudformation_command.py @@ -111,7 +111,8 @@ def test_must_raise_error_if_executable_not_found(self, platform_system_mock, po with self.assertRaises(OSError) as ctx: find_executable(execname) - expected = "Unable to find AWS CLI installation under following names: {}".format(["foo.cmd", "foo.exe", "foo"]) + expected = "Cannot find AWS CLI installation, was looking at executables with names: {}".format( + ["foo.cmd", "foo.exe", "foo"]) self.assertEquals(expected, str(ctx.exception)) self.assertEquals(popen_mock.mock_calls, [