Fix packaged runtime startup and version flag

This commit is contained in:
Advait Paliwal
2026-03-24 19:32:10 -07:00
parent cd85e875df
commit 79e14dd79d
3 changed files with 46 additions and 26 deletions

View File

@@ -293,6 +293,7 @@ export async function main(): Promise<void> {
cwd: { type: "string" },
doctor: { type: "boolean" },
help: { type: "boolean" },
version: { type: "boolean" },
"alpha-login": { type: "boolean" },
"alpha-logout": { type: "boolean" },
"alpha-status": { type: "boolean" },
@@ -310,6 +311,14 @@ export async function main(): Promise<void> {
return;
}
if (values.version) {
if (feynmanVersion) {
console.log(feynmanVersion);
return;
}
throw new Error("Unable to determine the installed Feynman version.");
}
const workingDir = resolve(values.cwd ?? process.cwd());
const sessionDir = resolve(values["session-dir"] ?? getDefaultSessionDir(feynmanHome));
const feynmanSettingsPath = resolve(feynmanAgentDir, "settings.json");