Skip to content

Commit

Permalink
Merge pull request #5687 from cb1kenobi/timob-16520
Browse files Browse the repository at this point in the history
[TIMOB-16520] Added better validation around iOS keychains.
  • Loading branch information
skypanther committed May 16, 2014
2 parents 353c36e + ae5b294 commit 78863b1
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,15 @@ iOSBuilder.prototype.config = function config(logger, config, cli) {
'keychain': {
abbr: 'K',
desc: __('path to the distribution keychain to use instead of the system default; only used when target is %s, %s, or %s', 'device'.cyan, 'dist-appstore'.cyan, 'dist-adhoc'.cyan),
hideValues: true
hideValues: true,
validate: function (value, callback) {
value && typeof value != 'string' && (value = null);
if (value && !fs.existsSync(value)) {
callback(new Error(__('Unable to find keychain: %s', value)));
} else {
callback(null, value);
}
}
},
'launch-url': {
// url for the application to launch in mobile Safari, as soon as the app boots up
Expand Down Expand Up @@ -789,9 +797,9 @@ iOSBuilder.prototype.validate = function (logger, config, cli) {
} else {
this.deployType = /^device|simulator$/.test(this.target) && cli.argv['deploy-type'] ? cli.argv['deploy-type'] : this.deployTypes[this.target];
}

this.buildType = cli.argv['build-type'] || '';

// manually inject the build profile settings into the tiapp.xml
switch (this.deployType) {
case 'production':
Expand Down

0 comments on commit 78863b1

Please sign in to comment.