CLI has captured keyboard input and has locked my pwsh session
PS D:\foo> aztfy.exe res --hcl-only /subscriptions/foo/resourceGroups/foo/providers/Microsoft.Web/sites/foo
The output directory is not empty. Please choose one of actions below:
* Press "Y" to overwrite the existing directory with new files
* Press "N" to append new files and add to the existing state instead
* Press other keys to quit
>
At this point the application is capturing all keyboard input and doesn't respond. The cursor flashes as if it's ready for input, but there are no keys echoed to the screen. I cannot even break out of it with CTRL+C.
This is reproducible on my machine. If I run the tool but exit out before generating hcl, then the next time I run it, the application is locked up. Even though I exited the application on the first run, file are still generated...
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 10/19/2022 12:50 PM .terraform
-a--- 10/19/2022 12:50 PM 1185 .terraform.lock.hcl
-a--- 10/19/2022 12:51 PM 2 aztfyResourceMapping.json
-a--- 10/19/2022 12:50 PM 182 provider.tf
If I just wipe the files created, running the tool works again. The bug is easily worked around, but thought I should report it.
@AgSync-Aaron Thank you for reporting this!
For the files generated even if you quit in the middle, that is as expected as some files are generated prior to importing (e.g. provider.tf).
Regarding the TUI behavior, I've noticed that only occurs on Windows. I've submit an issue to the UI library: https://github.com/charmbracelet/bubbletea/issues/563