refactor(env): migrated environment variables from OMP_ to PI_ prefix and centralized access via getEnv()
- Migrated environment variable access from direct process.env to centralized getEnv() utility function across all packages. - Renamed environment variable prefix from OMP_ to PI_ throughout codebase (e.g., OMP_CODING_AGENT_DIR -> PI_CODING_AGENT_DIR). - Removed automatic environment variable migration from PI_ to OMP_ prefixes via migrate-env.ts module. - Removed env setting from configuration schema and applyEnvironmentVariables() method from settings. - Updated CI/CD build configuration to use PI_COMPILED flag instead of OMP_COMPILED. - Changed venvPath property in PythonRuntime from nullable (string | null) to optional (string | undefined).
This commit is contained in:
@@ -40,10 +40,10 @@ describe("executeBash", () => {
|
||||
});
|
||||
|
||||
it("passes env vars", async () => {
|
||||
const result = await executeBash("echo $OMP_TEST_ENV", {
|
||||
const result = await executeBash("echo $PI_TEST_ENV", {
|
||||
cwd: tempDir,
|
||||
timeout: 5000,
|
||||
env: { OMP_TEST_ENV: "hello" },
|
||||
env: { PI_TEST_ENV: "hello" },
|
||||
});
|
||||
expect(result.output.trim()).toBe("hello");
|
||||
});
|
||||
@@ -166,7 +166,7 @@ describe("executeBash", () => {
|
||||
return;
|
||||
}
|
||||
const snapshotPath = path.join(tempDir, "snapshot.sh");
|
||||
fs.writeFileSync(snapshotPath, "export OMP_SNAPSHOT_TEST=from_snapshot\n");
|
||||
fs.writeFileSync(snapshotPath, "export PI_SNAPSHOT_TEST=from_snapshot\n");
|
||||
vi.spyOn(Settings.prototype, "getShellConfig").mockReturnValue({
|
||||
shell: bashPath,
|
||||
args: ["-l", "-c"],
|
||||
@@ -179,7 +179,7 @@ describe("executeBash", () => {
|
||||
vi.spyOn(shellSnapshot, "getOrCreateSnapshot").mockResolvedValue(snapshotPath);
|
||||
const sessionKey = "snapshot-test";
|
||||
await executeBash("true", { cwd: tempDir, timeout: 5000, sessionKey });
|
||||
const result = await executeBash("echo $OMP_SNAPSHOT_TEST", { cwd: tempDir, timeout: 5000, sessionKey });
|
||||
const result = await executeBash("echo $PI_SNAPSHOT_TEST", { cwd: tempDir, timeout: 5000, sessionKey });
|
||||
expect(result.output.trim()).toBe("from_snapshot");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user