This commit is contained in:
2026-01-20 15:39:46 +08:00
parent 9f20e149a0
commit 89470346be
20 changed files with 330 additions and 195 deletions

View File

@@ -384,6 +384,7 @@ export function parseArgs(args: string[]) {
*/
export const parseHomeArg = (homedir?: string) => {
const args = process.argv.slice(2);
const execPath = process.execPath;
const options = parseArgs(args);
let _configDir = undefined;
if (options.home && homedir) {
@@ -391,7 +392,9 @@ export const parseHomeArg = (homedir?: string) => {
} else if (options.root) {
_configDir = options.root;
}
const isOpencode = execPath.includes('.opencode') || execPath.includes('opencode.exe');
return {
isOpencode,
options,
configDir: _configDir,
};