mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 23:28:39 +08:00
fix: automatically open browser when starting only if in dev env
This commit is contained in:
parent
70096a8d6f
commit
f500fb4706
@ -127,14 +127,16 @@ class WebServerService extends BaseService {
|
||||
|
||||
const url = config.origin;
|
||||
|
||||
// Open the browser to the URL
|
||||
// Open the browser to the URL of Puter
|
||||
// (if we are in development mode only)
|
||||
if(config.env === 'dev') {
|
||||
try{
|
||||
const openModule = await import('open');
|
||||
openModule.default(url);
|
||||
}catch(e){
|
||||
console.log('Error opening browser', e);
|
||||
}
|
||||
|
||||
}
|
||||
this.startup_widget = () => {
|
||||
|
||||
const link = `\x1B[34;1m${osclink(url)}\x1B[0m`;
|
||||
|
Loading…
Reference in New Issue
Block a user