Skip to content

chore(task): exit process in Node.js#199

Merged
Brooooooklyn merged 1 commit into
mainfrom
09-25-chore_task_exit_process_in_node.js
Sep 25, 2025
Merged

chore(task): exit process in Node.js#199
Brooooooklyn merged 1 commit into
mainfrom
09-25-chore_task_exit_process_in_node.js

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

For debugging purpose

Copilot AI review requested due to automatic review settings September 25, 2025 03:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors exit handling in the CLI by moving process termination from Rust to Node.js. Instead of calling std::process::exit() directly in Rust, the code now returns exit codes that are handled by the Node.js layer.

  • Changed Rust function return type from Result<()> to Result<i32> to return exit codes
  • Removed direct std::process::exit() calls in Rust and return exit codes instead
  • Added exit code handling in Node.js with process.exit(exitCode)

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/cli/binding/src/lib.rs Modified run function to return exit codes instead of calling std::process::exit()
packages/cli/src/bin.ts Added .then() handler to receive exit code and call process.exit()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/cli/src/bin.ts

Brooooooklyn commented Sep 25, 2025

Copy link
Copy Markdown
Member Author

Merge activity

  • Sep 25, 9:29 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 25, 9:30 AM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 25, 9:34 AM UTC: @Brooooooklyn merged this pull request with Graphite.

@Brooooooklyn
Brooooooklyn force-pushed the 09-25-chore_task_exit_process_in_node.js branch from ef6e1d3 to 748ad2f Compare September 25, 2025 09:30
@Brooooooklyn
Brooooooklyn merged commit 8323be8 into main Sep 25, 2025
9 checks passed
@Brooooooklyn
Brooooooklyn deleted the 09-25-chore_task_exit_process_in_node.js branch September 25, 2025 09:34
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