From 0da57da9606d982788350a6257f0f0ed6e9fd92a Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Tue, 8 Mar 2022 11:44:16 -0500 Subject: [PATCH] fix(lambda-python): asset bundling fails on windows (#19270) The output directory should always use posix paths since this directory is being used within a linux docker container. I did not add any tests because it looks like there is no way to mock the `path` platform detection. fixes #18861 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/@aws-cdk/aws-lambda-python/lib/bundling.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts index 14af585f75509..27c8d24f83558 100644 --- a/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts +++ b/packages/@aws-cdk/aws-lambda-python/lib/bundling.ts @@ -69,7 +69,7 @@ export class Bundling implements CdkBundlingOptions { image, } = props; - const outputPath = path.join(AssetStaging.BUNDLING_OUTPUT_DIR, outputPathSuffix); + const outputPath = path.posix.join(AssetStaging.BUNDLING_OUTPUT_DIR, outputPathSuffix); const bundlingCommands = this.createBundlingCommand({ entry,