Skip to content

Commit

Permalink
Merge pull request #67 from hansemannn/TIMOB-23704
Browse files Browse the repository at this point in the history
[TIMOB-23704] Improve error when Podfile is empty
  • Loading branch information
hansemannn authored Sep 6, 2016
2 parents 6dacc7e + 4923be8 commit 58b55a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion metabase/ios/lib/metabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ function runPodInstallIfRequired(basedir, callback) {
}
], function(err, pod, version) {
if (err) { return callback(err); }
util.logger.trace('Found pod ' + version + ' at ' + pod);
util.logger.trace('Found CocoaPods ' + version + ' (' + pod + ')');
if (semver.lt(version, '1.0.0')) {
util.logger.warn('Using a CocoaPods version below 1.0.0 is deprecated. Please update your CocoaPods installation with: sudo gem install cocoapods');
}
Expand Down Expand Up @@ -714,7 +714,15 @@ function generateCocoaPods (cachedir, basedir, appDir, sdkType, sdkVersion, minS
if (!fs.existsSync(Podfile)) {
util.logger.debug('No CocoaPods file found');
return callback();
} else {
var content = fs.readFileSync(Podfile).toString();

if (content.length && content.indexOf('pod ') === -1) {
util.logger.warn('Podfile found, but no pod\'s specified. Skipping ...');
return callback();
}
}

runPodInstallIfRequired(basedir, function (err) {
if (err) { return callback(err); }
runCocoaPodsBuild(basedir, appDir, sdkType, sdkVersion, minSDKVersion, xcodesettings, function (err, libs, libDir) {
Expand Down

0 comments on commit 58b55a1

Please sign in to comment.