Upgrade which / simplify use
Summary: It's already a promise. With the next upgrade this otherwise causes some nasty type errors due to overloading. Reviewed By: jknoxville Differential Revision: D18059641 fbshipit-source-id: 93cee95d7bbf767ff6276a0946262bf83587c728
This commit is contained in:
committed by
Facebook Github Bot
parent
561d560e18
commit
d54b341192
@@ -114,7 +114,7 @@
|
||||
"@types/redux-devtools-extension": "^2.13.2",
|
||||
"@types/redux-mock-store": "^1.0.1",
|
||||
"@types/rsocket-tcp-server": "^0.0.2",
|
||||
"@types/which": "^1.3.1",
|
||||
"@types/which": "^1.3.2",
|
||||
"JSONStream": "^1.3.1",
|
||||
"adbkit": "^2.11.1",
|
||||
"adbkit-logcat": "^2.0.1",
|
||||
|
||||
@@ -13,15 +13,12 @@ import {spawn} from 'child_process';
|
||||
import {dirname} from 'path';
|
||||
import {selectDevice, preferDevice} from '../reducers/connections';
|
||||
import {default as which} from 'which';
|
||||
import {promisify} from 'util';
|
||||
import {showOpenDialog} from '../utils/exportData';
|
||||
import PropTypes from 'prop-types';
|
||||
import BaseDevice from '../devices/BaseDevice';
|
||||
import React, {Component} from 'react';
|
||||
import {State} from '../reducers';
|
||||
|
||||
const whichPromise = promisify(which);
|
||||
|
||||
type StateFromProps = {
|
||||
selectedDevice: BaseDevice | null | undefined;
|
||||
androidEmulators: Array<string>;
|
||||
@@ -48,7 +45,7 @@ class DevicesButton extends Component<Props> {
|
||||
launchEmulator = (name: string) => {
|
||||
// On Linux, you must run the emulator from the directory it's in because
|
||||
// reasons ...
|
||||
whichPromise('emulator')
|
||||
which('emulator')
|
||||
.then(emulatorPath => {
|
||||
if (emulatorPath) {
|
||||
const child = spawn(emulatorPath, [`@${name}`], {
|
||||
|
||||
@@ -1460,10 +1460,10 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/which@^1.3.1":
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.1.tgz#7802c380887986ca909008afea4e08025b130f8d"
|
||||
integrity sha512-ZrJDWpvg75LTGX4XwuneY9s6bF3OeZcGTpoGh3zDV9ytzcHMFsRrMIaLBRJZQMBoGyKs6unBQfVdrLZiYfb1zQ==
|
||||
"@types/which@^1.3.2":
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf"
|
||||
integrity sha512-8oDqyLC7eD4HM307boe2QWKyuzdzWBj56xI/imSl2cpL+U3tCMaTAkMJ4ee5JBZ/FsOJlvRGeIShiZDAl1qERA==
|
||||
|
||||
"@types/yargs-parser@*":
|
||||
version "13.1.0"
|
||||
|
||||
Reference in New Issue
Block a user