Skip to content

Commit

Permalink
Refactor product name resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedev committed May 5, 2018
1 parent 92bf511 commit d9d255a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions local-cli/runIOS/runIOS.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,8 @@ function buildProject(xcodeProject, udid, scheme, configuration = 'Debug', launc
}
//FULL_PRODUCT_NAME is the actual file name of the app, which actually comes from the Product Name in the build config, which does not necessary match a scheme name, example output line: export FULL_PRODUCT_NAME="Super App Dev.app"
let productNameMatch = /export FULL_PRODUCT_NAME="?(.+).app"?$/m.exec(buildOutput);
if (productNameMatch && productNameMatch.length && productNameMatch.length > 1) {
return resolve(productNameMatch[1]);//0 is the full match, 1 is the app name
}
return buildProcess.error ? reject(buildProcess.error) : resolve();
//[0] of productNameMatch is the full match, [1] is the app name
return resolve(productNameMatch && productNameMatch.length && productNameMatch.length > 1 ? productNameMatch[1] : undefined);
});
});
}
Expand Down

0 comments on commit d9d255a

Please sign in to comment.