fix(desktop): use shell working directory on initial launch (#10655)
This commit is contained in:
@@ -847,6 +847,17 @@ const parseArgs = () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (!dirPath && process.stdin.isTTY) {
|
||||
try {
|
||||
const cwd = process.cwd();
|
||||
if (path.parse(cwd).root !== cwd) {
|
||||
dirPath = cwd;
|
||||
}
|
||||
} catch {
|
||||
// cwd unavailable; fall through to recentDirs
|
||||
}
|
||||
}
|
||||
|
||||
return { dirPath };
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user