Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Check if project file is correct when looking for project dir #329

Merged
merged 1 commit into from
May 19, 2015

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented May 14, 2015

No description provided.


private isProjectFileCorrect(projectFilePath: string): boolean {
if(this.$staticConfig.CLIENT_NAME_KEY_IN_PROJECT_FILE) {
var fileContent = this.$fs.readJson(projectFilePath).wait();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code can throw, should we catch it here and return false, or let uplevel code handle it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually when we use this function we are sure that the file exists - https://github.com/telerik/mobile-cli-lib/pull/329/files#diff-2fc55d29fa5bf8690e0a4ae30a71effdR25

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It exists, but the content may not be a JSON.

@Fatme Fatme force-pushed the fatme/package.json branch from 5f05025 to 6d8404e Compare May 19, 2015 08:33
@teobugslayer
Copy link
Contributor

👍

@teobugslayer teobugslayer added this to the AB 2.10.0 milestone May 19, 2015
Fatme pushed a commit that referenced this pull request May 19, 2015
Check if project file is correct when looking for project dir
@Fatme Fatme merged commit c539660 into master May 19, 2015
@Fatme Fatme deleted the fatme/package.json branch May 19, 2015 11:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants