Skip to content

Commit

Permalink
fix(lambda-python): asset bundling fails on windows (#19270)
Browse files Browse the repository at this point in the history
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*
  • Loading branch information
corymhall authored Mar 8, 2022
1 parent 1e352ca commit 0da57da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-python/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0da57da

Please sign in to comment.