Skip to content

Commit b53c173

Browse files
JayBazuzibpasero
andauthored
Change error message when launching a second admin instance (microsoft#166146)
* Change error message when launching a second admin instance Previously it said "second instance" to refer to the already-running instance, which came _first_. * 💄 Co-authored-by: Benjamin Pasero <[email protected]>
1 parent a62879b commit b53c173

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/vs/code/electron-main/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class CodeMain {
273273
} catch (error) {
274274

275275
// Handle unexpected errors (the only expected error is EADDRINUSE that
276-
// indicates a second instance of Code is running)
276+
// indicates another instance of VS Code is running)
277277
if (error.code !== 'EADDRINUSE') {
278278

279279
// Show a dialog for errors that can be resolved by the user
@@ -293,7 +293,7 @@ class CodeMain {
293293
if (!retry || isWindows || error.code !== 'ECONNREFUSED') {
294294
if (error.code === 'EPERM') {
295295
this.showStartupWarningDialog(
296-
localize('secondInstanceAdmin', "A second instance of {0} is already running as administrator.", productService.nameShort),
296+
localize('secondInstanceAdmin', "Another instance of {0} is already running as administrator.", productService.nameShort),
297297
localize('secondInstanceAdminDetail', "Please close the other instance and try again."),
298298
productService.nameLong
299299
);
@@ -318,7 +318,7 @@ class CodeMain {
318318

319319
// Tests from CLI require to be the only instance currently
320320
if (environmentMainService.extensionTestsLocationURI && !environmentMainService.debugExtensionHost.break) {
321-
const msg = 'Running extension tests from the command line is currently only supported if no other instance of Code is running.';
321+
const msg = `Running extension tests from the command line is currently only supported if no other instance of ${productService.nameShort} is running.`;
322322
logService.error(msg);
323323
client.dispose();
324324

@@ -377,7 +377,7 @@ class CodeMain {
377377

378378
// Print --status usage info
379379
if (environmentMainService.args.status) {
380-
logService.warn('Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started.');
380+
logService.warn(`Warning: The --status argument can only be used if ${productService.nameShort} is already running. Please run it again after {0} has started.`);
381381

382382
throw new ExpectedError('Terminating...');
383383
}
@@ -468,7 +468,7 @@ class CodeMain {
468468
// is closed and then exit the waiting process.
469469
//
470470
// Note: we are not doing this if the wait marker has been already
471-
// added as argument. This can happen if Code was started from CLI.
471+
// added as argument. This can happen if VS Code was started from CLI.
472472

473473
if (args.wait && !args.waitMarkerFilePath) {
474474
const waitMarkerFilePath = createWaitMarkerFileSync(args.verbose);

0 commit comments

Comments
 (0)