mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
This commit is contained in:
parent
2d131d25d1
commit
2a8dea3225
|
@ -382,7 +382,7 @@ class CodeMain {
|
|||
|
||||
// Print --status usage info
|
||||
if (environmentMainService.args.status) {
|
||||
logService.warn('Warning: The --status argument can only be used if {0} is already running. Please run it again after {0} has started.', productService.nameShort);
|
||||
logService.warn(localize('statusWarning', "Warning: The --status argument can only be used if {0} is already running. Please run it again after {0} has started.", productService.nameShort));
|
||||
|
||||
throw new ExpectedError('Terminating...');
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ export async function main(argv: string[]): Promise<any> {
|
|||
|
||||
const processCallbacks: ((child: ChildProcess) => Promise<void>)[] = [];
|
||||
|
||||
const verbose = args.verbose || args.status;
|
||||
const verbose = args.verbose;
|
||||
if (verbose) {
|
||||
env['ELECTRON_ENABLE_LOGGING'] = '1';
|
||||
|
||||
|
@ -413,6 +413,9 @@ export async function main(argv: string[]): Promise<any> {
|
|||
|
||||
let child: ChildProcess;
|
||||
if (!isMacOSBigSurOrNewer) {
|
||||
if (!verbose && args.status) {
|
||||
options['stdio'] = 'pipe'; // restore ability to see output when --status is used
|
||||
}
|
||||
// We spawn process.execPath directly
|
||||
child = spawn(process.execPath, argv.slice(2), options);
|
||||
} else {
|
||||
|
@ -431,7 +434,7 @@ export async function main(argv: string[]): Promise<any> {
|
|||
// -a opens the given application.
|
||||
spawnArgs.push('-a', process.execPath); // -a: opens a specific application
|
||||
|
||||
if (verbose) {
|
||||
if (verbose || args.status) {
|
||||
spawnArgs.push('--wait-apps'); // `open --wait-apps`: blocks until the launched app is closed (even if they were already running)
|
||||
|
||||
// The open command only allows for redirecting stderr and stdout to files,
|
||||
|
|
Loading…
Reference in a new issue