Skip to content

findNodeProcess compatible bosybox ps command#65

Closed
nAnderYang wants to merge 2 commits intoeggjs:masterfrom
nAnderYang:master
Closed

findNodeProcess compatible bosybox ps command#65
nAnderYang wants to merge 2 commits intoeggjs:masterfrom
nAnderYang:master

Conversation

@nAnderYang
Copy link
Copy Markdown

@nAnderYang nAnderYang commented Apr 8, 2026

The issue of egg-scripts stop failing to run on Alpine (Buxybox) systems.

Summary by CodeRabbit

  • Bug Fixes
    • Improved process detection on non-Windows systems so the app correctly detects and uses BusyBox-style or standard ps variants, reducing failures on constrained or embedded environments.
    • Windows process detection behavior remains unchanged.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: faff6f82-d518-4407-8cd9-3e8e5ed7ec49

📥 Commits

Reviewing files that changed from the base of the PR and between f9d7de4 and 090f391.

📒 Files selected for processing (1)
  • src/helper.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/helper.ts

📝 Walkthrough

Walkthrough

The findNodeProcess function in src/helper.ts now detects BusyBox at runtime on non-Windows platforms and chooses between a BusyBox-compatible ps -w -A -o pid,args and the standard ps -wweo "pid,args" invocation; Windows logic is unchanged.

Changes

Cohort / File(s) Summary
BusyBox compatibility
src/helper.ts
Added runtime detection for BusyBox on non-Windows platforms and select a BusyBox-compatible ps invocation (ps -w -A -o pid,args) or the previous standard ps -wweo "pid,args"; Windows (wmic) branch unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I sniffed the shell at break of day,

BusyBox or coreutils — I find the way,
A tiny hop, a gentle tweak,
Processes found in hide-and-seek,
Hooray! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly references the main change: making findNodeProcess compatible with BusyBox ps command, which directly aligns with the changeset that detects BusyBox and uses appropriate ps flags.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the process discovery logic in src/helper.ts to handle BusyBox environments by detecting the ps implementation and adjusting flags accordingly. Feedback suggests that the BusyBox-specific command should include -w and -A flags to ensure all processes are listed and command arguments are not truncated.

Comment thread src/helper.ts Outdated
@nAnderYang
Copy link
Copy Markdown
Author

#64

busybox no parameter `-w` and `-A`

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@nAnderYang
Copy link
Copy Markdown
Author

@fengmk2

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 16, 2026

Open in StackBlitz

npm i https://pkg.pr.new/eggjs/scripts/@eggjs/scripts@65

commit: 090f391

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 16, 2026

@nAnderYang Need to fix it first at https://github.com/eggjs/egg/tree/next/tools/scripts, then sync it here

@fengmk2 fengmk2 linked an issue Apr 16, 2026 that may be closed by this pull request
@nAnderYang
Copy link
Copy Markdown
Author

@nAnderYang nAnderYang closed this Apr 17, 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.

npm stop error in alpine(busybox)

2 participants