mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
fix(setup): retain explicitly selected ILSpy paths
This commit is contained in:
@@ -2,6 +2,7 @@ import type { DoctorProviderInspection } from "./Doctor.js";
|
||||
import { compareUnicodeCodePoints } from "../domain/unicodeCodePointOrder.js";
|
||||
|
||||
const SELECTED_REGISTRATION_SETTINGS = [
|
||||
"REA_ILSPY_CMD_PATH",
|
||||
"REA_ANALYSIS_PROVIDER",
|
||||
"REA_ASAR_MAX_HEADER_BYTES",
|
||||
"REA_BRIDGE_MAX_REQUEST_BYTES",
|
||||
|
||||
@@ -23,6 +23,29 @@ import { snapshotEnvironment } from "./process/snapshotEnvironment.js";
|
||||
|
||||
afterEach(() => vi.unstubAllEnvs());
|
||||
|
||||
it.each([undefined, "/caller/tools with spaces/ilspycmd"])(
|
||||
"preserves the explicit ILSpy path %s without inventing an unset value",
|
||||
async (selected) => {
|
||||
const host = systemSetupHost(
|
||||
createDoctorHostFixture({
|
||||
...(selected === undefined ? {} : { configuredIlspyCmdPath: selected }),
|
||||
ilspyCmdVersion: async () => "ilspycmd 9.1.0",
|
||||
}),
|
||||
selected === undefined ? {} : { REA_ILSPY_CMD_PATH: selected },
|
||||
);
|
||||
try {
|
||||
const state = await host.initialSetupState();
|
||||
expect(state.providerEnvironment.REA_ILSPY_CMD_PATH).toBe(selected);
|
||||
if (selected !== undefined)
|
||||
expect(state.doctor.checks).toContainEqual(
|
||||
expect.objectContaining({ name: "ilspycmd", ok: true }),
|
||||
);
|
||||
} finally {
|
||||
await host.close?.();
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
it("plans setup and uninstall against selected home and client overrides", async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), "rea-selected-setup-"));
|
||||
const environment = {
|
||||
|
||||
Reference in New Issue
Block a user