Replace child-process promise version
Summary: This one is in TS, so we get types for free. `promisify` makes it rather awkward to work with overloaded functions like `spawn`, so there's still value in having a proper library for this. Reviewed By: jknoxville Differential Revision: D17204471 fbshipit-source-id: 3d07edfe2bb8c1e4c4f3134b53a0c4a0d9be383b
This commit is contained in:
committed by
Facebook Github Bot
parent
4d7e776672
commit
b90200e2aa
@@ -8,7 +8,7 @@
|
||||
import BaseDevice, {DeviceType, DeviceShell, LogLevel} from './BaseDevice';
|
||||
import {Priority} from 'adbkit-logcat-fb';
|
||||
import child_process from 'child_process';
|
||||
import child_process_promise from 'child-process-es6-promise';
|
||||
import promisify_child_process from 'promisify-child-process';
|
||||
import ArchivedDevice from './ArchivedDevice';
|
||||
import {ReadStream} from 'fs';
|
||||
|
||||
@@ -82,7 +82,9 @@ export default class AndroidDevice extends BaseDevice {
|
||||
|
||||
clearLogs(): Promise<void> {
|
||||
this.logEntries = [];
|
||||
return child_process_promise.spawn('adb', ['logcat', '-c']);
|
||||
return promisify_child_process
|
||||
.spawn('adb', ['logcat', '-c'])
|
||||
.then(_ => undefined);
|
||||
}
|
||||
|
||||
archive(): ArchivedDevice {
|
||||
|
||||
Reference in New Issue
Block a user