Skip to content

feat(install): support abort installing#61

Merged
BlackHole1 merged 2 commits intooomol-lab:mainfrom
BlackHole1:support-abort-install
Apr 1, 2025
Merged

feat(install): support abort installing#61
BlackHole1 merged 2 commits intooomol-lab:mainfrom
BlackHole1:support-abort-install

Conversation

@BlackHole1
Copy link
Member

No description provided.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@BlackHole1 BlackHole1 requested review from Copilot and l1shen April 1, 2025 07:47
Copy link
Contributor

Copilot AI left a comment

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 introduces support for aborting installation processes via an AbortSignal across various install functions. Key changes include:

  • Adding an optional cancelSignal property to installation options’ interfaces.
  • Propagating cancelSignal through install functions and child process invocations.
  • Adding tests to verify that cancellation aborts install operations correctly.

Reviewed Changes

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

File Description
src/cmd/install.ts Introduces the cancelSignal option and propagates it to relevant functions; adds a forceKillAfterDelay parameter.
src/cmd/install.test.ts Adds tests for the cancellation behavior during install-all and install-deps operations.
Comments suppressed due to low confidence (1)

src/cmd/install.ts:254

  • [nitpick] Consider extracting the '1000' magic number into a well-named constant for improved clarity and maintainability.
forceKillAfterDelay: 1000,

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BlackHole1 BlackHole1 force-pushed the support-abort-install branch from d7030dc to 50eff0f Compare April 1, 2025 07:49
@BlackHole1 BlackHole1 merged commit 53d0f4f into oomol-lab:main Apr 1, 2025
1 check passed
@BlackHole1 BlackHole1 deleted the support-abort-install branch April 1, 2025 08:40
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