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

CLI has captured keyboard input and has locked my pwsh session #266

Open
AgSync-Aaron opened this issue Oct 19, 2022 · 1 comment
Open
Labels
bug Something isn't working upstream-ui

Comments

@AgSync-Aaron
Copy link

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.

@magodo
Copy link
Collaborator

magodo commented Oct 20, 2022

@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: charmbracelet/bubbletea#563

@magodo magodo added bug Something isn't working upstream-ui labels Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream-ui
Projects
None yet
Development

No branches or pull requests

2 participants