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

Cancelling sorting using Ctrl-C does not restore hidden cursor #1424

Open
mainrs opened this issue Jan 27, 2025 · 1 comment
Open

Cancelling sorting using Ctrl-C does not restore hidden cursor #1424

mainrs opened this issue Jan 27, 2025 · 1 comment
Labels
bug A confirmed issues that needs fixing up-for-grabs Issues to consider for external contribution

Comments

@mainrs
Copy link

mainrs commented Jan 27, 2025

Paste the command

npx --yes mainrs/igir move zip test clean report \
  --dat "./dats/*" \
  --dat "./custom/*.dat" \
  --input inputs \
 -- input outputs \
 --output outputs

Describe the bug

While pressing Ctrl-C during the scanning operation, the CLI closes, but the hidden cursor is not made visible again. This probably requires a signal handler registered.

Expected behavior

The cursor is visible again after cancelling the CLI.

Debug logs

None.

DAT(s) used

No-Intro

igir version

3.0.1

Node.js version

22.12

Operating system

Linux

Additional context

No response

@mainrs mainrs added the potential-bug A potential issue that needs confirmation and/or triage label Jan 27, 2025
@emmercm emmercm added bug A confirmed issues that needs fixing up-for-grabs Issues to consider for external contribution and removed potential-bug A potential issue that needs confirmation and/or triage labels Feb 13, 2025
@emmercm
Copy link
Owner

emmercm commented Feb 13, 2025

This is one I've really struggled with--sometimes it happens, sometimes it doesn't, and I swore I have the right signal handlers as suggested. Here:

igir/index.ts

Lines 29 to 34 in c391c21

process.once('SIGINT', () => {
ProgressBarCLI.stop();
logger.newLine();
logger.notice(`Exiting ${Package.NAME} early`);
process.exit(0);
});

I'd love help debugging this one from anyone who has time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed issues that needs fixing up-for-grabs Issues to consider for external contribution
Projects
None yet
Development

No branches or pull requests

2 participants