Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Ensure the selected device is booted
Browse files Browse the repository at this point in the history
  • Loading branch information
fson committed Feb 25, 2021
1 parent b7404c0 commit fe22cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/expo-cli/src/commands/run/buildAndroidClientAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export default async function buildAndroidClientAsync(
if (!device) {
return;
}
const bootedDevice = await Android.attemptToStartEmulatorOrAssertAsync(device);
if (!bootedDevice) {
return;
}

const spinner = ora('Building app ').start();

Expand Down
2 changes: 1 addition & 1 deletion packages/xdl/src/Android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ async function _openUrlAsync({
return openProject;
}

async function attemptToStartEmulatorOrAssertAsync(device: Device): Promise<Device | null> {
export async function attemptToStartEmulatorOrAssertAsync(device: Device): Promise<Device | null> {
// TODO: Add a light-weight method for checking since a device could disconnect.

if (!(await isDeviceBootedAsync(device))) {
Expand Down

0 comments on commit fe22cf6

Please sign in to comment.