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

fix: πŸ› ensure process exits after copying project files #76

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

blazeshomida
Copy link
Contributor

  • πŸ› Added process.exit(0) to cleanly terminate the Node.js process once project files are copied.
  • βœ… Prevents hanging processes after file operations are complete.

- πŸ› Added `process.exit(0)` to cleanly terminate the Node.js process once project files are copied.
- βœ… Prevents hanging processes after file operations are complete.
@yusukebe
Copy link
Member

yusukebe commented Oct 12, 2024

Hi @blazeshomida

If the current code (without process.exit(0)) is not good for me, can I reproduce it?

@blazeshomida
Copy link
Contributor Author

@yusukebe Sorry I'm not sure I understand the question. However, when running the cli without the process.exit(0) the process just hangs. I need to manually press ctrl+c to kill the process. If you run the cli currently (without the process.exit(0)) you'll see the script hang on completion.

@yusukebe
Copy link
Member

yusukebe commented Oct 12, 2024

@blazeshomida

Thank you for the response, and sorry for my bad explanation.

If you run the cli currently (without the process.exit(0)) you'll see the script hang on completion.

On my machine, this behavior does not occur, and it works well.

If your problem will be solved with this PR, it's okay to merge. But, I'd like to reproduce the problem in my environment. I think the process should be exited normally without intentionally doing process.exit(0).

@blazeshomida
Copy link
Contributor Author

blazeshomida commented Oct 12, 2024

@yusukebe
I'm sorry, after more testing, I notice that the script is only hanging when using the deno run command. I tried running it with pnpm then picking the deno template and it works. I think the issue is with Deno and not Hono. I apologize. I thought that it was something simple, turn's out it wasn't πŸ˜….

Feel free to close the PR without merging. It's my mistake.

@yusukebe
Copy link
Member

yusukebe commented Oct 12, 2024

@blazeshomida

I see! No problem. Closing this PR.

@yusukebe
Copy link
Member

Hey @blazeshomida

Now reopened. Let's merge it to resolve this issue: honojs/hono#3528, though it's a Deno-side matter.

@yusukebe yusukebe merged commit 536f371 into honojs:main Oct 20, 2024
6 checks passed
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.

2 participants