Skip to content

Commit

Permalink
fix: throw iOS errors that are not DeviceLocked (#200)
Browse files Browse the repository at this point in the history
Closes #199.

Co-authored-by: Tim Lancina <tlancina@users.noreply.github.com>
  • Loading branch information
tlancina and tlancina committed Sep 3, 2021
1 parent 9f6fd78 commit 3ac6914
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios/run.ts
Expand Up @@ -82,15 +82,15 @@ async function runIpaOrAppFileOnInterval(config: IOSRunConfig): Promise<void> {
const run = async () => {
try {
await runIpaOrAppFile(config);
} catch (err) {
} catch (err: any) {
if (
err instanceof IOSLibError &&
err.code == 'DeviceLocked' &&
retryCount < maxRetryCount
) {
await retry();
} else {
if (maxRetryCount >= retryCount) {
if (retryCount >= maxRetryCount) {
error = new IOSRunException(
`Device still locked after 1 minute. Aborting.`,
ERR_DEVICE_LOCKED,
Expand Down

0 comments on commit 3ac6914

Please sign in to comment.