Skip to content

Commit

Permalink
update string
Browse files Browse the repository at this point in the history
  • Loading branch information
HBobertz committed Oct 9, 2024
1 parent 24c3d55 commit 3376c89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/private/handlers/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class FileAssetHandler implements IAssetHandler {
throw new Error(
`❗❗ UNEXPECTED BUCKET OWNER DETECTED ❗❗
We've detected that the S3 bucket cdk-hnb659fds-assets-${await account()}-${destination.region} was
We've detected that the S3 bucket ${destination.bucketName} was
originally created in account ${await account()} as part of the CloudFormation stack CDKToolkit,
but now resides in a different AWS account. To prevent cross-account asset bucket access of your
deployments, CDK will stop now.
Expand Down
4 changes: 1 addition & 3 deletions test/files.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,7 @@ test('fails when cross account is required but not allowed', async () => {
return { promise: () => Promise.resolve() };
});

await expect(pub.publish({ allowCrossAccount: false })).rejects.toThrow(
'❗❗ UNEXPECTED BUCKET OWNER DETECTED ❗❗'
);
await expect(pub.publish({ allowCrossAccount: false })).rejects.toThrow('❗❗ UNEXPECTED BUCKET OWNER DETECTED ❗❗');
});

test('succeeds when bucket doesnt belong to us but doesnt contain account id - cross account', async () => {
Expand Down

0 comments on commit 3376c89

Please sign in to comment.