@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed package commands such as `pi list`, `pi install`, and `pi update` to terminate after completing even if an extension leaves background handles open ([#5687](https://github.com/earendil-works/pi/issues/5687)).
|
||||||
- Fixed `pi update` for pnpm global installs whose configured `global-bin-dir` no longer matches the active pnpm home ([#5689](https://github.com/earendil-works/pi/issues/5689)).
|
- Fixed `pi update` for pnpm global installs whose configured `global-bin-dir` no longer matches the active pnpm home ([#5689](https://github.com/earendil-works/pi/issues/5689)).
|
||||||
- Fixed npm package specs that use ranges or tags (for example `@^1.2.7`) so installed package resources still load instead of being treated as mismatched exact pins ([#5695](https://github.com/earendil-works/pi/issues/5695)).
|
- Fixed npm package specs that use ranges or tags (for example `@^1.2.7`) so installed package resources still load instead of being treated as mismatched exact pins ([#5695](https://github.com/earendil-works/pi/issues/5695)).
|
||||||
- Fixed inherited OpenCode/OpenCode Go completion model metadata to omit long-retention cache fields for routes that reject `prompt_cache_retention` ([#5702](https://github.com/earendil-works/pi/issues/5702)).
|
- Fixed inherited OpenCode/OpenCode Go completion model metadata to omit long-retention cache fields for routes that reject `prompt_cache_retention` ([#5702](https://github.com/earendil-works/pi/issues/5702)).
|
||||||
|
|||||||
@@ -467,6 +467,7 @@ export async function main(args: string[], options?: MainOptions) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
|
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
|
||||||
|
process.exit(process.exitCode ?? 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,21 @@ describe("package commands", () => {
|
|||||||
originalExitCode = process.exitCode;
|
originalExitCode = process.exitCode;
|
||||||
originalExecPath = process.execPath;
|
originalExecPath = process.execPath;
|
||||||
process.exitCode = undefined;
|
process.exitCode = undefined;
|
||||||
|
vi.spyOn(process, "exit").mockImplementation(((code?: string | number | null) => {
|
||||||
|
if (code === undefined || code === null || Number(code) === 0) {
|
||||||
|
process.exitCode = undefined;
|
||||||
|
} else {
|
||||||
|
process.exitCode = code;
|
||||||
|
}
|
||||||
|
return undefined as never;
|
||||||
|
}) as typeof process.exit);
|
||||||
process.env[ENV_AGENT_DIR] = agentDir;
|
process.env[ENV_AGENT_DIR] = agentDir;
|
||||||
process.chdir(projectDir);
|
process.chdir(projectDir);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
vi.unstubAllGlobals();
|
vi.unstubAllGlobals();
|
||||||
|
vi.restoreAllMocks();
|
||||||
process.chdir(originalCwd);
|
process.chdir(originalCwd);
|
||||||
process.exitCode = originalExitCode;
|
process.exitCode = originalExitCode;
|
||||||
if (originalAgentDir === undefined) {
|
if (originalAgentDir === undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user