Skip to content

在chsrc执行 命令时 遇到错误会强制退出 #269

@combinx

Description

@combinx

你操作了什么?

Image

发生了什么?

在chsrc运行底层命令时,如遇到错误总是会提示意外退出

本应该怎么样?

应给予更友好的提示处理

chsrc 版本

v0.2.2-2025/07/26

你使用的是哪个操作系统?

Linux

OS 版本 / OS 发行版

manjaro

Log 输出

[chsrc 运行] pnpm config get registry
 ENOENT  spawnSync npm ENOENT

pnpm: spawnSync npm ENOENT
    at Object.spawnSync (node:internal/child_process:1120:20)
    at Object.spawnSync (node:child_process:910:24)
    at spawn.spawnSync [as sync] (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:14786:26)
    at runScriptSync (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:134874:45)
    at runNpm (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:134862:14)
    at configGet (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:135032:59)
    at Object.handler (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:135386:46)
    at /usr/lib/node_modules/pnpm/dist/pnpm.cjs:198750:52
    at async main (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:198716:34)
    at async runPnpm (/usr/lib/node_modules/pnpm/dist/pnpm.cjs:198983:5)
[chsrc 运行] x 命令执行失败,退出状态: 65024
chsrc: 关键错误,强制结束

防止重复问题

  • 我已在项目中搜索过类似的 issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions