Skip to content

Commit 5869a51

Browse files
committed
fix: create workspace dir before browsersettings.json
If the app is being started for the first time, the workspace directory doesn't exist, so startup will fail with an error. To fix this, ensure the workspace directory is created at startup. Signed-off-by: Nick Hale <[email protected]>
1 parent 15b7766 commit 5869a51

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

electron/main.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ async function startServer(isPackaged) {
3939
console.log(`Starting app server with GPTSCRIPT_BIN="${process.env.GPTSCRIPT_BIN}"`);
4040

4141
// Set up the browser tool to run in headless mode.
42+
ensureDirExists(process.env.WORKSPACE_DIR)
4243
writeFileSync(`${process.env.WORKSPACE_DIR}/browsersettings.json`, JSON.stringify({ headless: true }));
4344

4445
try {

0 commit comments

Comments
 (0)