Fix promisify-child-process use
Summary: Per title. Somehow both typecheck, but importing the module like this doesn't work. Reviewed By: jknoxville Differential Revision: D17285507 fbshipit-source-id: 40a38db5dfb52213e0407f8bda83f2ebad5c50c7
This commit is contained in:
committed by
Facebook Github Bot
parent
d8cd69666e
commit
b19f08ba54
@@ -8,7 +8,7 @@
|
||||
import BaseDevice, {DeviceType, DeviceShell, LogLevel} from './BaseDevice';
|
||||
import {Priority} from 'adbkit-logcat-fb';
|
||||
import child_process from 'child_process';
|
||||
import promisify_child_process from 'promisify-child-process';
|
||||
import {spawn} from 'promisify-child-process';
|
||||
import ArchivedDevice from './ArchivedDevice';
|
||||
import {ReadStream} from 'fs';
|
||||
|
||||
@@ -82,8 +82,7 @@ export default class AndroidDevice extends BaseDevice {
|
||||
|
||||
clearLogs(): Promise<void> {
|
||||
this.logEntries = [];
|
||||
return promisify_child_process
|
||||
.spawn('adb', ['logcat', '-c'])
|
||||
return spawn('adb', ['logcat', '-c'])
|
||||
.then(_ => undefined);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* @format
|
||||
*/
|
||||
import {DeviceType} from '../devices/BaseDevice';
|
||||
import promisify_child_process from 'promisify-child-process';
|
||||
import {exec} from 'promisify-child-process';
|
||||
import {notNull} from '../utils/typeUtils';
|
||||
|
||||
const errorMessage = 'Physical iOS devices not yet supported';
|
||||
@@ -21,7 +21,7 @@ function isAvailable(): boolean {
|
||||
}
|
||||
|
||||
async function targets(): Promise<Array<DeviceTarget>> {
|
||||
const {stdout} = await promisify_child_process.exec('instruments -s devices');
|
||||
const {stdout} = await exec('instruments -s devices');
|
||||
if (!stdout) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user