feat(codex): mirror git bash preflight locally

Plan: plans/codex-windows-git-bash-profile.md
This commit is contained in:
YeonGyu-Kim
2026-05-31 06:03:52 +09:00
parent 2996b5775e
commit 37346a86f7
4 changed files with 247 additions and 1 deletions
+8 -1
View File
@@ -21,6 +21,7 @@ import {
resolvePluginSource,
validatePathSegment,
} from "./install/marketplace.mjs";
import { resolveGitBashForCurrentProcess } from "./install/git-bash.mjs";
const LEGACY_CODEX_PLUGIN_MARKETPLACE = ["code", "yeongyu", "codex", "plugins"].join("-");
const SISYPHUS_LEGACY_CACHE_MARKETPLACES = ["lazycodex", LEGACY_CODEX_PLUGIN_MARKETPLACE];
@@ -45,6 +46,12 @@ export async function installMarketplaceLocally(options = {}) {
const platform = options.platform ?? process.platform;
const runCommand = options.runCommand ?? defaultRunCommand;
const log = options.log ?? console.log;
const gitBashResolution = platform === "win32"
? (options.gitBashResolver ?? (() => resolveGitBashForCurrentProcess({ platform, env })))()
: { found: true, path: null, source: "not-required" };
if (!gitBashResolution.found) {
throw new Error(gitBashResolution.installHint);
}
const codexPackageRoot = join(repoRoot, "packages", "omo-codex");
const marketplace = await readMarketplace(repoRoot, {
marketplacePath: join(codexPackageRoot, "marketplace.json"),
@@ -128,7 +135,7 @@ export async function installMarketplaceLocally(options = {}) {
log(`Installed ${plugin.name}@${marketplace.name} -> ${plugin.path}`);
}
return { marketplaceName: marketplace.name, installed };
return { marketplaceName: marketplace.name, installed, gitBashPath: gitBashResolution.path };
}
function agentNameFromToml(fileName) {