Fix "insecure":true in a profile

This was broken in commit 99d9113eae
This commit is contained in:
Trent Mick 2015-09-21 13:57:10 -07:00
parent b4900ea626
commit 0c2ade98ba

View File

@ -244,7 +244,11 @@ CLI.prototype._applyProfileOverrides =
function _applyProfileOverrides(profile) { function _applyProfileOverrides(profile) {
var self = this; var self = this;
['account', 'url', 'keyId', 'insecure'].forEach(function (field) { ['account', 'url', 'keyId', 'insecure'].forEach(function (field) {
if (self.opts.hasOwnProperty(field)) { // We need to check `opts._order` to know if boolean opts
// were specified.
var specified = self.opts._order.filter(
function (opt) { return opt.key === field; }).length > 0;
if (specified) {
profile[field] = self.opts[field]; profile[field] = self.opts[field];
} }
}); });