Skip to content

Commit ea4ba36

Browse files
iskermrgrain
andauthored
fix(cdk-assets): indicate correct docker command that failed to execute (#504)
Users may override the executable used (instead of `docker`) by setting the CDK_DOCKER environment variable, but the message of the error thrown when such an executable does not exist was not similarly dynamic. Align the contents of the message with the executable invoked. Fixes #282. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: Ian Kerins <git@isk.haus> Co-authored-by: Momo Kornher <mail@moritzkornher.de>
1 parent a602917 commit ea4ba36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cdk-assets/lib/private/docker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export class Docker {
226226
} catch (e: any) {
227227
if (e.code === 'ENOENT') {
228228
throw new Error(
229-
"Unable to execute 'docker' in order to build a container asset. Please install 'docker' and try again.",
229+
`Failed to find and execute '${getDockerCmd()}' while attempting to build a container asset. Please install '${getDockerCmd()}' and try again. (Or set the 'CDK_DOCKER ' environment variable to choose a different compatible container client.)`,
230230
);
231231
}
232232
throw e;

0 commit comments

Comments
 (0)