fix(cli): surface package manager command execution failures

This commit is contained in:
root 2026-02-27 01:09:45 +08:00
parent 1177d38087
commit 62e262785f
11 changed files with 95 additions and 58 deletions

View file

@ -2,6 +2,7 @@ import { ui } from "../../environment/userInteraction.js";
import { safeSpawn } from "../../utils/safeSpawn.js";
import { mergeSafeChainProxyEnvironmentVariables } from "../../registryProxy/registryProxy.js";
import { getCombinedCaBundlePath } from "../../registryProxy/certBundle.js";
import { reportCommandExecutionFailure } from "../_shared/commandErrors.js";
/**
* Sets CA bundle environment variables used by Python libraries and uv.
@ -60,12 +61,6 @@ export async function runUv(command, args) {
return { status: result.status };
} catch (/** @type any */ error) {
if (error.status) {
return { status: error.status };
} else {
ui.writeError(`Error executing command: ${error.message}`);
ui.writeError(`Is '${command}' installed and available on your system?`);
return { status: 1 };
}
return reportCommandExecutionFailure(error, command);
}
}