Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion electron/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const port =
const gptscriptBin =
process.env.GPTSCRIPT_BIN ||
join(
dev ? join(resourcesDir, 'app.asar.unpacked') : '',
!dev ? join(resourcesDir, 'app.asar.unpacked') : '',
'node_modules',
'@gptscript-ai',
'gptscript',
Expand Down
6 changes: 3 additions & 3 deletions electron/main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import os from 'os';
import { config } from './config.mjs';

app.on('window-all-closed', () => app.quit());
app.on('ready', () => {
startServer(app.isPackaged);
});
app.on('ready', startServer);

async function startServer() {
// Fix path so that tools can find binaries installed on the system.
Expand All @@ -33,6 +31,8 @@ async function startServer() {
process.env.GPTSCRIPT_OPENAPI_REVAMP = 'true';
process.env.KNOWLEDGE_BIN = config.knowledgeBin;

console.log('GPTSCRIPT_BIN=', config.gptscriptBin);

try {
const url = await startAppServer({
dev: config.dev,
Expand Down