Skip to content

Commit

Permalink
Don't throw an error for the android project only
Browse files Browse the repository at this point in the history
  • Loading branch information
vomchik committed May 31, 2021
1 parent 4aa6c72 commit 7ac6ea2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,14 @@ loadAppConfig()
);
}

const validatePaths = () => new Promise((resolve, reject) => {
const validatePaths = () => new Promise(resolve => {
const paths = iosRequiredPaths(currentAppName);

paths.forEach((item) => {
if (!fs.existsSync(path.join(__dirname, item))) {
reject(new Error(`Can't find an ios path or project. Make sure that the ios project path and property 'name' in app.json the same.`));
const warning = `Can't find an ios path or project. Make sure that the ios project path and property 'name' in app.json the same.`;

console.log(colors.red(warning));
}
});

Expand Down
3 changes: 1 addition & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export function iosRequiredPaths(currentAppName) {
const nS_CurrentAppName = currentAppName.replace(/\s/g, '');

return [
`ios/${nS_CurrentAppName}`,
`ios/${nS_CurrentAppName}.xcodeproj`,
`ios/${nS_CurrentAppName}`
]
}

0 comments on commit 7ac6ea2

Please sign in to comment.