Skip to content

Commit 00de2f1

Browse files
committed
server cli: remove --exec, show warning when in compatibility mode
1 parent b978d71 commit 00de2f1

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/vs/server/main.js

+11-12
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ perf.mark('code/server/start');
1616
global.vscodeServerStartTime = performance.now();
1717

1818
async function start() {
19-
if (process.argv[2] === '--exec') {
20-
console.warn('--exec is deprecated and will be removed.');
21-
process.argv.splice(1, 2);
22-
require(process.argv[1]);
23-
return;
24-
}
25-
2619
const minimist = require('minimist');
2720

2821
// Do a quick parse to determine if a server or the cli needs to be started
@@ -43,6 +36,12 @@ async function start() {
4336
return;
4437
}
4538

39+
if (parsedArgs['compatibility'] === '1.63') {
40+
console.warn(`server.sh is being replaced by 'bin/${product.applicationName}'. Please migrate to the new command and adopt the following new default behaviors:`);
41+
console.warn('* connection token is mandatody unless --without-connection-token is used');
42+
console.warn('* host defaults to 127.0.0.1');
43+
}
44+
4645
/**
4746
* @typedef { import('./remoteExtensionHostAgentServer').IServerAPI } IServerAPI
4847
*/
@@ -148,9 +147,9 @@ async function start() {
148147
}
149148

150149
/**
151-
* If `--pick-port` and `--port` is specified, connect to that port.
150+
* If `--pick - port` and `--port` is specified, connect to that port.
152151
*
153-
* If not and a port range is specified through `--pick-port`
152+
* If not and a port range is specified through `--pick - port`
154153
* then find a free port in that range. Throw error if no
155154
* free port available in range.
156155
*
@@ -177,7 +176,7 @@ async function parsePort(host, strPort, strPickPort) {
177176
if (port !== undefined) {
178177
return port;
179178
}
180-
console.warn(`--port: Could not find free port in range: ${range.start}-${range.end}.`);
179+
console.warn(`--port: Could not find free port in range: ${range.start} - ${range.end}.`);
181180
process.exit(1);
182181

183182
} else {
@@ -195,11 +194,11 @@ async function parsePort(host, strPort, strPickPort) {
195194
if (port !== undefined) {
196195
return port;
197196
}
198-
console.log(`--pick-port: Could not find free port in range: ${range.start}-${range.end}.`);
197+
console.log(`--pick - port: Could not find free port in range: ${range.start} - ${range.end}.`);
199198
process.exit(1);
200199
}
201200
} else {
202-
console.log(`--pick-port "${strPickPort}" is not properly formatted.`);
201+
console.log(`--pick - port "${strPickPort}" is not properly formatted.`);
203202
process.exit(1);
204203
}
205204
}

0 commit comments

Comments
 (0)