Skip to content

fix: Restore to project directory after using nodewhisper#239

Merged
ChetanXpro merged 1 commit intoChetanXpro:mainfrom
yannagrebah:main
Apr 11, 2026
Merged

fix: Restore to project directory after using nodewhisper#239
ChetanXpro merged 1 commit intoChetanXpro:mainfrom
yannagrebah:main

Conversation

@yannagrebah
Copy link
Copy Markdown
Contributor

This PR fixes a minor oversight. When using nodewhisper(), it changes the current working directory to ./cpp/whisper.cpp instead of the project directory. This could cause problems when using other processes that rely on the current working directory.
This just restores the current directory to the project directory after all functions are done. Funny enough, this was already handled when an error occurred with handleError().

@Sleavely
Copy link
Copy Markdown

Sleavely commented Mar 26, 2026

Could you apply the same finally-statement in src/autoDownloadModel.ts? It also only resets in the catch-block.

Edit: And in src/downloadModel.ts which doesn't seem to have any cleanup logic at all.

Copy link
Copy Markdown
Owner

@ChetanXpro ChetanXpro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ChetanXpro ChetanXpro merged commit 17286bd into ChetanXpro:main Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants