Skip to content

Commit

Permalink
fix(ios): print more helpful error if app path doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina authored and imhoffd committed May 30, 2019
1 parent 8dd89fe commit 49819b0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ios/run.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { remove } from '@ionic/utils-fs';
import * as Debug from 'debug';
import { mkdtempSync } from 'fs';
import { existsSync, mkdtempSync } from 'fs';
import * as path from 'path';

import { CLIException, ERR_BAD_INPUT, ERR_TARGET_NOT_FOUND, RunException } from '../errors';
Expand All @@ -21,6 +21,11 @@ export async function run(args: string[]) {
const preferSimulator = args.includes('--virtual');
const waitForApp = args.includes('--connect');
const isIPA = appPath.endsWith('.ipa');

if (!existsSync(appPath)) {
throw new RunException(`Path '${appPath}' not found`);
}

try {
if (isIPA) {
const { tmpdir } = await import('os');
Expand Down

0 comments on commit 49819b0

Please sign in to comment.