Skip to content

Commit fde7428

Browse files
authored
Fix: core doesn't open setup url in browser (#46)
* fix(core): open(url) crashes some distros -> mainly those who don't have xdg-open in their path (because don't have a browser - because real server) * chore(core/index): simplify open in browser logic * fix(core): inexistant export being imported -> pls stop with these torturous mistakes Maximus
1 parent 0da8a98 commit fde7428

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/core/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import './common/env';
33
import path, { join } from 'node:path';
44
import { readFileSync } from 'node:fs';
55
import Fastify from 'fastify';
6-
import open from 'open';
76
import fastifyStatic from '@fastify/static';
87
import fastifyWebsocket from '@fastify/websocket';
98
import fastifyCookie from '@fastify/cookie';
@@ -20,6 +19,7 @@ import { sessionManager } from './modules/session/manager';
2019
import { restartScheduler } from './modules/schedule/manager';
2120
import { setupTokenManager } from './modules/setup/token';
2221
import { MIGRATE_WORKER_FLAG, runMigrateWorker } from './migrate-worker';
22+
import open from 'open';
2323

2424
const ip = getIp();
2525

@@ -47,7 +47,7 @@ if (!isFxManagerSetup()) {
4747
`\t${localhostUrl}`,
4848
);
4949

50-
open(localhostUrl);
50+
open(localhostUrl).catch(() => {});
5151
}
5252
const fastify = Fastify({ logger: !isProduction, forceCloseConnections: true });
5353

0 commit comments

Comments
 (0)