aspect-cli
aspect-cli copied to clipboard
[FR]: `aspect init` should handle a `SIGINT` signal (keyboard interrupt / `CTRL +C`)
What is the current behavior?
Today if I run aspect init it clones https://github.com/aspect-build/aspect-workflows-template: https://github.com/aspect-build/aspect-cli/blob/39875c856b24e185d93bcd0cbb1956245792767a/pkg/aspect/init/init.go#L76 and enters interactive mode. If a user do not proceed (hits CTRL + C) it does not gracefully handle this event.
It exits with status code = 1, prints Error: user aborted and leaves the cloned github.com directory in the current dir.
Describe the feature
When an user aborts the init operation, it should cleanup changes done to the current workdir and do not treat it as an error.