fix: Route copilot install to .github/ instead of opencode default

Add copilot case to resolveTargetOutputRoot so `install --to copilot`
writes to .github/ in the current directory instead of falling through
to the opencode default (~/.config/opencode).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Brayan Jules
2026-02-17 01:44:44 -03:00
parent 5d984ab2da
commit 7055df5d8e

View File

@@ -25,7 +25,7 @@ export default defineCommand({
to: {
type: "string",
default: "opencode",
description: "Target format (opencode | codex | droid | cursor | pi | gemini)",
description: "Target format (opencode | codex | droid | cursor | pi | copilot | gemini)",
},
output: {
type: "string",
@@ -187,6 +187,10 @@ function resolveTargetOutputRoot(
const base = hasExplicitOutput ? outputRoot : process.cwd()
return path.join(base, ".gemini")
}
if (targetName === "copilot") {
const base = hasExplicitOutput ? outputRoot : process.cwd()
return path.join(base, ".github")
}
return outputRoot
}