-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
TUI exits on gpg command abort #7
Comments
Hi from the Hacktoberfest discord 🖖! This one looks interesting. I've used a signal handler before (to gracefully shut down a container), but haven't forwarded a Rust doesn't seem to have a built-in way to send signals, other than I'd enable a signal handler only while the child process runs and otherwise default to the normal behaviour of aborting the process. I'm a bit busy next week, but if the above sounds reasonable, you can assign me and I should have it fixed by the end of next weekend. (That's how it works, right? My crates aren't popular, so I haven't really gotten contributions on them yet 😅) |
Hello @Tamschi, sure thing. This is actually a little bit critical since seeing |
Sure thing! There's actually one question I have before starting: I see that you've combined the branches for commands that launch |
I think having the handler only for the interactive ones would be good. Non-interactive (single shot) commands does not have this problem afterall. |
Okay, in that case I can simply use the default behaviour in edge cases and only consider |
A small progress update, since I found some time yesterday but likely won't continue for a few days now: It was easier to try this in isolation (and turned out to be really easy to encapsulate in the end), so I spun up a library project that I'll (also) publish for other crates to use. You can see that here, it's working on Unix so far (though I can't quite easily test it on Mac; maybe if I learn a bit more about doing CI there later on): https://github.com/Tamschi/clack#readme The main TODOs (polish aside) are:
Since I'm making a library, there are two ways I could implement the fix for gpg-tui:
Feel free to answer this later when my code is more complete. I'll let you know when I'm ready to start work on the PR itself. |
You may have noticed, but I haven't updated my repository in a while. A few things happened that mean I'm having to prioritise more what I spend my energy on for the time being. I'm sorry to say, but as it stands right now, it's unlikely I'll be able to submit a fix in a time frame where staying assigned to the issue would make sense. (I.e. I have to suspend this project indefinitely. It would be better to put the issue up for grabs again.) |
Ah, no problem, I'm sorry to hear that. I hope everything will get better for you soon 🙏🏼 Feel free to tackle this issue again if it is not resolved in the future 👍🏼 |
Any chance to try TUI binary on Windows 7 x64? |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
g
(generate key)gpg
is waiting for input, pressCtrl-C
Expected behavior
gpg-tui should continue working after aborting a
gpg
command.System Information
Arch Linux x86_64 5.12.7-arch1-1
]1.54.0-nightly
]1.15.1
]2.2.27
]0.1.3
]Additional context
If you press
e
and seegpg --edit-key
command is ran, you can abortgpg
and resume TUI via typingq
orquit
.The text was updated successfully, but these errors were encountered: