mirror of
https://github.com/danog/code-server.git
synced 2024-11-27 04:45:52 +01:00
Fix open flag when using 0.0.0.0
This commit is contained in:
parent
b6fdb7d0e7
commit
db41f106bc
@ -193,9 +193,11 @@ const main = async (): Promise<void> => {
|
||||
console.log(" - Not serving HTTPS");
|
||||
}
|
||||
|
||||
if (args["open"]) {
|
||||
await open(serverAddress).catch(console.error);
|
||||
console.log(` - Opened ${serverAddress}`);
|
||||
if (!args.socket && args.open) {
|
||||
// The web socket doesn't seem to work if using 0.0.0.0.
|
||||
const openAddress = `http://localhost:${port}`;
|
||||
await open(openAddress).catch(console.error);
|
||||
console.log(` - Opened ${openAddress}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user