Skip to content

Commit

Permalink
Merge pull request #1195 from NativeScript/fatme/fix-doctor
Browse files Browse the repository at this point in the history
Fix doctor command
  • Loading branch information
Fatme authored and Fatme committed Nov 16, 2015
2 parents 9d7a6b7 + 890cc8c commit 0cedf90
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/services/doctor-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,22 @@ class DoctorService implements IDoctorService {
result = true;
}

if(!sysInfo.cocoapodVer ) {
if(!sysInfo.cocoapodVer) {
this.$logger.warn("WARNING: CocoaPod is not installed or is not configured properly.");
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
+ "To be able to build such projects, verify that you have installed CocoaPod.");
result = true;
}

if(sysInfo.cocoapodVer && semver.lt(sysInfo.cocoapodVer, DoctorService.MIN_SUPPORTED_POD_VERSION)) {
this.$logger.warn(`WARNING: CocoaPods version is lower than ${DoctorService.MIN_SUPPORTED_POD_VERSION}`);
if (sysInfo.cocoapodVer && semver.valid(sysInfo.cocoapodVer) === null) {
this.$logger.warn(`WARNING: CocoaPods version is not a valid semver version.`);
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
+ `To be able to build such projects, verify that you have at least ${DoctorService.MIN_SUPPORTED_POD_VERSION} version installed.`);
result = true;
}

if (sysInfo.cocoapodVer && semver.valid(sysInfo.cocoapodVer) && semver.lt(sysInfo.cocoapodVer, DoctorService.MIN_SUPPORTED_POD_VERSION)) {
this.$logger.warn(`WARNING: CocoaPods version is lower than ${DoctorService.MIN_SUPPORTED_POD_VERSION}.`);
this.$logger.out("You will not be able to build your projects for iOS if they contain plugin with CocoaPod file." + EOL
+ `To be able to build such projects, verify that you have at least ${DoctorService.MIN_SUPPORTED_POD_VERSION} version installed.`);
result = true;
Expand Down

0 comments on commit 0cedf90

Please sign in to comment.