File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ const startVscode = async (): Promise<void | void[]> => {
120
120
121
121
const server = new MainServer ( {
122
122
...options ,
123
- port : typeof args . port !== "undefined" && parseInt ( args . port , 10 ) || 8080 ,
123
+ port : typeof args . port !== "undefined" ? parseInt ( args . port , 10 ) : 8080 ,
124
124
socket : args . socket ,
125
125
} , args ) ;
126
126
@@ -151,7 +151,7 @@ const startVscode = async (): Promise<void | void[]> => {
151
151
152
152
if ( ! server . options . socket && args . open ) {
153
153
// The web socket doesn't seem to work if browsing with 0.0.0.0.
154
- const openAddress = `http://localhost: ${ server . options . port } ` ;
154
+ const openAddress = serverAddress . replace ( / : \/ \/ 0 . 0 . 0 . 0 / , "://localhost" ) ;
155
155
await open ( openAddress ) . catch ( console . error ) ;
156
156
logger . info ( ` - Opened ${ openAddress } ` ) ;
157
157
}
You can’t perform that action at this time.
0 commit comments