Skip to main content

parse_gh_error

Function parse_gh_error 

Source
pub fn parse_gh_error(stderr: &[u8]) -> PlatformCliError
Expand description

解析 gh CLI 的 stderr 输出为统一的 PlatformCliError。

优先尝试 JSON 格式解析(gh 在 API 错误时输出 JSON), 回退到纯文本模式(取前三行作为内部详情)。 用户可见消息为中文。