Skip to content

fix(cli): surface missing runtime command errors#326

Merged
SanderDeclerck merged 2 commits intoAikidoSec:mainfrom
liuxiaopai-ai:fix/issue-309-command-execution-error
Mar 19, 2026
Merged

fix(cli): surface missing runtime command errors#326
SanderDeclerck merged 2 commits intoAikidoSec:mainfrom
liuxiaopai-ai:fix/issue-309-command-execution-error

Conversation

@liuxiaopai-ai
Copy link
Copy Markdown

@liuxiaopai-ai liuxiaopai-ai commented Feb 26, 2026

Summary

  • add a shared command execution error helper used by all package-manager runners
  • when safeSpawn throws (for example when a wrapped command is not installed), print the command error and install hint instead of returning { status } silently
  • preserve existing exit-code semantics while improving diagnostics
  • add targeted unit coverage for the shared error-reporting helper

Why

Users currently get no actionable output when wrapper command execution fails during startup/scan (e.g. wrapped command missing). This makes incidents harder to diagnose.

Testing

  • node --test src/packagemanager/_shared/commandErrors.spec.js
  • full test suite currently unavailable in this environment due missing dependencies in this environment

Summary by Aikido

Security Issues: 0 Quality Issues: 0 Resolved Issues: 0

⚡ Enhancements

  • Added centralized command execution error helper and integrated it

🔧 Refactors

  • Replaced duplicated catch blocks and removed now-unused ui imports

More info

@liuxiaopai-ai
Copy link
Copy Markdown
Author

Addressed lint blocker from review:

  • removed unused ui imports in bun/npm/npx/pnpm/yarn runners
  • verified npm run lint --workspace=packages/safe-chain passes
  • verified node --test --experimental-test-module-mocks src/packagemanager/_shared/commandErrors.spec.js passes

Latest commit: ce05e82

@SanderDeclerck SanderDeclerck merged commit 9749990 into AikidoSec:main Mar 19, 2026
20 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