An override should override and not conflict
notatestuser opened this issue · comments
I'm using kanso 1.3.3.
When our project's kanso.json
contains an attribute to be overridden:
{
...
"jade": {
"compile": true,
"remove_from_attachments": true
},
...
}
with a .kansorc
that contains an override for an aforementioned attribute:
exports.env =
{ 'someenv':
{ db: 'http://.../...'
, overrides:
{ env: "sandbox"
, jade:
{ compress: false
, compile: ["static", "test"]
}
}
}
...
the following happens on an attempt to push:
$ kanso push someenv
Reading dependency tree...
Error: Error: Conflicting property at: jade.compile
Between: true and ["static","test"]
at Object.exports.merge (/usr/local/lib/node_modules/kanso/lib/packages.js:387:23)
at Object.exports.merge (/usr/local/lib/node_modules/kanso/lib/packages.js:383:28)
at exports.load (/usr/local/lib/node_modules/kanso/lib/packages.js:48:17)
at async.forEach (/usr/local/lib/node_modules/kanso/node_modules/async/lib/async.js:105:25)
at async.forEach (/usr/local/lib/node_modules/kanso/node_modules/async/lib/async.js:105:25)
at Object.async.forEach (/usr/local/lib/node_modules/kanso/node_modules/async/lib/async.js:93:20)
at Object.exports.readMetaDependencies (/usr/local/lib/node_modules/kanso/lib/packages.js:157:11)
at exports.readMeta (/usr/local/lib/node_modules/kanso/lib/packages.js:138:21)
at Object.async.memoize.memoized [as load] (/usr/local/lib/node_modules/kanso/node_modules/async/lib/async.js:663:26)
at exports.readMeta (/usr/local/lib/node_modules/kanso/lib/packages.js:133:18)
Failed
Oh no!
There is a clear workaround and that is to omit the original variable from kanso.json
and operate only with overrides. Though what's actually happening can seem a little unclear.