deno-library / progress

ProgressBar in terminal for deno
MIT License
60 stars 9 forks source link

Handle interrupt gracefully #10

Closed kidonng closed 1 year ago

kidonng commented 2 years ago

When the program is interruppted (for example via ctrl c), the end() function never gets called, neither does the showCursor() function. Hence, the cursor remains hidden even the program is exited.

https://github.com/deno-library/progress/blob/94710a90cde44743b179123fe190b36c15684428/multi.ts#L158-L166

fuxingZhang commented 2 years ago

@kidonng can you submit a pull request ?

fuxingZhang commented 2 years ago

Landed in v1.3.0

https://github.com/deno-library/progress/commit/c7f01b296bae7420215b9b256d4426bcc74660a8