File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ async function launchServer(options: LaunchOptions) {
229229
230230 let serverLocation : string | undefined ;
231231 if ( codeServerPath ) {
232- serverLocation = join ( codeServerPath , `server.${ process . platform === 'win32' ? 'cmd' : 'sh' } ` ) ;
232+ const { serverApplicationName } = require ( join ( codeServerPath , 'product.json' ) ) ;
233+ serverLocation = join ( codeServerPath , 'bin' , `${ serverApplicationName } ${ process . platform === 'win32' ? '.cmd' : '' } ` ) ;
233234 args . push ( `--logsPath=${ logsPath } ` ) ;
234235
235236 logger . log ( `Starting built server from '${ serverLocation } '` ) ;
Original file line number Diff line number Diff line change 55
66import * as path from 'path' ;
77import * as cp from 'child_process' ;
8+ import { promises as fs } from 'fs' ;
89import * as playwright from '@playwright/test' ;
910import * as url from 'url' ;
1011import * as tmp from 'tmp' ;
@@ -130,7 +131,8 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
130131
131132 let serverLocation : string ;
132133 if ( process . env . VSCODE_REMOTE_SERVER_PATH ) {
133- serverLocation = path . join ( process . env . VSCODE_REMOTE_SERVER_PATH , `server.${ process . platform === 'win32' ? 'cmd' : 'sh' } ` ) ;
134+ const { serverApplicationName } = require ( path . join ( process . env . VSCODE_REMOTE_SERVER_PATH , 'product.json' ) ) ;
135+ serverLocation = path . join ( process . env . VSCODE_REMOTE_SERVER_PATH , 'bin' , `${ serverApplicationName } ${ process . platform === 'win32' ? '.cmd' : '' } ` ) ;
134136 serverArgs . push ( `--logsPath=${ logsPath } ` ) ;
135137
136138 if ( optimist . argv . debug ) {
You can’t perform that action at this time.
0 commit comments