Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(toolkit): request response #32926

Closed
wants to merge 2 commits into from
Closed

Conversation

kaizencc
Copy link
Contributor

adds a helper method named askUserConfirmation which uses ioHost.requestResponse.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team January 14, 2025 22:17
@github-actions github-actions bot added the p2 label Jan 14, 2025
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 14, 2025
Comment on lines +118 to +120
export function markTesting() {
TESTING = true;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assume this would still be necessary when we test

motivation: string,
question: string,
) {
await withCorkedLogging(async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#32898 needs to be implemented before we can get rid of this, right?

throw new ToolkitError(`${motivation}, but concurrency is greater than 1 so we are unable to get a confirmation from the user`);
}

const confirmed = await ioHost.requestResponse<any, boolean>(prompt(`${chalk.cyan(question)} (y/n)?`));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not too sure what to do here. prompt currently is nothing and a build failure atm. should this be written in aws-cdk/lib/logging.ts?

@kaizencc kaizencc closed this Jan 15, 2025
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant