Skip to content

Commit

Permalink
chore: only warn about missing profiles if there are any
Browse files Browse the repository at this point in the history
  • Loading branch information
hansemannn committed Sep 28, 2024
1 parent e1ba42d commit e665411
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/provisioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ function detect(options, callback) {
distribution: 0
},

ppRegExp = /.*\.(mobileprovision|provisionprofile)$/;
ppRegExp = /.*\.(mobileprovision|provisionprofile)$/;


if (options.watch) {
var throttleTimer = null;
Expand Down Expand Up @@ -141,7 +141,7 @@ function detect(options, callback) {
function detectIssues() {
results.issues = [];

if (!results.provisioning.development.length || !valid.development) {
if (results.provisioning.development.length >0 && !valid.development) {
results.issues.push({
id: 'IOS_NO_VALID_DEVELOPMENT_PROVISIONING_PROFILES',
type: 'warning',
Expand All @@ -150,7 +150,7 @@ function detect(options, callback) {
});
}

if (!results.provisioning.adhoc.length || !valid.adhoc) {
if (results.provisioning.adhoc.length > 0 && !valid.adhoc) {
results.issues.push({
id: 'IOS_NO_VALID_ADHOC_PROVISIONING_PROFILES',
type: 'warning',
Expand All @@ -159,7 +159,7 @@ function detect(options, callback) {
});
}

if (!results.provisioning.distribution.length || !valid.distribution) {
if (results.provisioning.distribution.length > 0 && !valid.distribution) {
results.issues.push({
id: 'IOS_NO_VALID_DISTRIBUTION_PROVISIONING_PROFILES',
type: 'warning',
Expand Down Expand Up @@ -255,10 +255,10 @@ function detect(options, callback) {
});
}

detectIssues();
cache = results;
emitter.emit('detected', results);
return callback(null, results);
detectIssues();
cache = results;
emitter.emit('detected', results);
return callback(null, results);
});
};

Expand Down

0 comments on commit e665411

Please # to comment.