提交 4dd53510 编写于 作者: D Daniel Imms

Have --verbose work on the bin command

Fixes #6556
上级 bbc1950d
......@@ -94,6 +94,7 @@ ${ indent }-r, --reuse-window Force opening a file or folder in the last acti
${ indent } window.
${ indent }--user-data-dir <dir> Specifies the directory that user data is kept in,
${ indent } useful when running as root.
${ indent }--verbose Print verbose output (implies --wait).
${ indent }-v, --version Print version.
${ indent }-w, --wait Wait for the window to be closed before returning.
${ indent }--list-extensions List the installed extensions.
......
......@@ -35,14 +35,23 @@ export function main(args: string[]): TPromise<void> {
});
delete env['ATOM_SHELL_INTERNAL_RUN_AS_NODE'];
const child = spawn(process.execPath, args, {
detached: true,
stdio: 'ignore',
env
});
let options = {
detacted: true,
env,
};
if (!argv.verbose) {
options['stdio'] = 'ignore';
}
const child = spawn(process.execPath, args, options);
if (argv.verbose) {
child.stdout.on('data', (data) => console.log(data.toString('utf8').trim()));
child.stderr.on('data', (data) => console.log(data.toString('utf8').trim()));
}
if (argv.wait) {
return new TPromise<void>(c => child.once('exit', ()=> c(null)));
if (argv.wait || argv.verbose) {
return new TPromise<void>(c => child.once('exit', () => c(null)));
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册