fix(coding-agent): harden omp update install-target detection
Use Bun-native command execution and PATH-prioritized resolution so updates apply to the installation users actually invoke.\n\nFixes #247
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from "bun:test";
|
||||
import { _resolveUpdateMethodForTest } from "../src/cli/update-cli";
|
||||
|
||||
describe("update-cli install target detection", () => {
|
||||
it("uses bun update when prioritized omp is inside bun global bin", () => {
|
||||
const method = _resolveUpdateMethodForTest("/Users/test/.bun/bin/omp", "/Users/test/.bun/bin");
|
||||
|
||||
expect(method).toBe("bun");
|
||||
});
|
||||
|
||||
it("uses binary update when prioritized omp is outside bun global bin", () => {
|
||||
const method = _resolveUpdateMethodForTest("/Users/test/.local/bin/omp", "/Users/test/.bun/bin");
|
||||
|
||||
expect(method).toBe("binary");
|
||||
});
|
||||
|
||||
it("uses binary update when bun global bin cannot be resolved", () => {
|
||||
const method = _resolveUpdateMethodForTest("/Users/test/.local/bin/omp", undefined);
|
||||
|
||||
expect(method).toBe("binary");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user