[CLI] init failed virtualenv for python should print errors in red or not print Welcome message #8720
Labels
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
package/tools
Related to AWS CDK Tools or CLI
The Question
If I run
cdk init --language python
and I don't have python3-venv installed the Welcome message output scrolls the error messages off of the screen and are not obvious.Error in the code references this command
aws-cdk/packages/aws-cdk/lib/init.ts
Line 323 in 0e96415
The output is very helpful but ultimately not noticeable because it scrolls by so fast and is immediately followed by
# Welcome to your CDK Python project!
which made me assume the command was successful or previous errors were not important.Ideally (for me) if there was an error with the virtualenv the welcome message would not be printed so the last output would be the error and how to fix it.
Environment
Other information
I first ran into the problem running through the workshop when I was told to activate the virtualenv. It may also be helpful to update the workshop to point out if the .env/bin/activate file doesn't exist then something may have gone wrong and a user should try to install python3-venv and re-init the repo.
The text was updated successfully, but these errors were encountered: