Merge branch 'aeschli/adoptServerScript'

This commit is contained in:
Martin Aeschlimann 2022-01-19 21:31:12 +01:00
commit f7baac67c1
No known key found for this signature in database
GPG key ID: 2609A01E695523E3
2 changed files with 4 additions and 2 deletions

View file

@ -229,7 +229,8 @@ async function launchServer(options: LaunchOptions) {
let serverLocation: string | undefined;
if (codeServerPath) {
serverLocation = join(codeServerPath, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`);
const { serverApplicationName } = require(join(codeServerPath, 'product.json'));
serverLocation = join(codeServerPath, 'bin', `${serverApplicationName}${process.platform === 'win32' ? '.cmd' : ''}`);
args.push(`--logsPath=${logsPath}`);
logger.log(`Starting built server from '${serverLocation}'`);

View file

@ -130,7 +130,8 @@ async function launchServer(browserType: BrowserType): Promise<{ endpoint: url.U
let serverLocation: string;
if (process.env.VSCODE_REMOTE_SERVER_PATH) {
serverLocation = path.join(process.env.VSCODE_REMOTE_SERVER_PATH, `server.${process.platform === 'win32' ? 'cmd' : 'sh'}`);
const { serverApplicationName } = require(path.join(process.env.VSCODE_REMOTE_SERVER_PATH, 'product.json'));
serverLocation = path.join(process.env.VSCODE_REMOTE_SERVER_PATH, 'bin', `${serverApplicationName}${process.platform === 'win32' ? '.cmd' : ''}`);
serverArgs.push(`--logsPath=${logsPath}`);
if (optimist.argv.debug) {