fix(1718): make --dir work when launching Goose.app (#4642)

This commit is contained in:
Alex Hancock
2025-09-15 12:41:45 -04:00
committed by GitHub
parent 0ccb57ba32
commit 70c40a1073
+2 -1
View File
@@ -434,9 +434,10 @@ let envToggles: EnvToggles = loadSettings().envToggles;
// Parse command line arguments
const parseArgs = () => {
const args = process.argv.slice(2); // Remove first two elements (electron and script path)
let dirPath = null;
// Remove first two elements in dev mode (electron and script path)
const args = !dirPath && app.isPackaged ? process.argv : process.argv.slice(2);
for (let i = 0; i < args.length; i++) {
if (args[i] === '--dir' && i + 1 < args.length) {
dirPath = args[i + 1];