Skip to content

Commit 921ab0f

Browse files
committed
Comments
1 parent d4a351c commit 921ab0f

File tree

1 file changed

+8
-0
lines changed
  • packages/aws-cdk/lib/cli

1 file changed

+8
-0
lines changed

packages/aws-cdk/lib/cli/cli.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,14 @@ export function cli(args: string[] = process.argv.slice(2)) {
734734
} catch (e: any) {
735735
await CliIoHost.get()?.asIoHelper().defaults.trace(`Ending Telemetry failed: ${e.message}`);
736736
}
737+
/*
738+
* The SDK may leave open handles in some environments. One case we have seen is
739+
* MetadataService leaving an open socket in GitHub Actions. To ensure that
740+
* the CLI exits in all environments, we explicitly call process.exit() after
741+
* ending telemetry.
742+
*
743+
* See https://github.com/aws/aws-sdk-js-v3/issues/7538.
744+
*/
737745
process.exit();
738746
});
739747
}

0 commit comments

Comments
 (0)