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
1 changed files with 5 additions and 1 deletions

View File

@ -244,7 +244,11 @@ CLI.prototype._applyProfileOverrides =
function _applyProfileOverrides(profile) {
var self = this;
['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];
}
});