Sails version: 1.1.0
Node version: 8.9.1
NPM version: 6.8.0
DB adapter name: N/A
DB adapter version: N/A
Operating system: Windows
Using mocha's --globals flag in mocha.opts file now causes error
userError: As of Sails v1, if `sails.config.globals` is defined, it must either be `false` or a dictionary (plain JavaScript object) or `false`. But instead, got: 'sails'
> Note: if no globals config is specified, Sails will now assume `false` (no globals). This is to allow for more intuitive programmatic usage.
For more info, see http://sailsjs.com/config/globals
Maybe there is some configuration to not take command line arguments for config?
Hi @svmn! It looks like you missed a step or two when you created your issue. Please edit your comment (use the pencil icon at the top-right corner of the comment box) and fix the following:
As soon as those items are rectified, post a new comment (e.g. “Ok, fixed!”) below and we'll take a look. Thanks!
*If you feel this message is in error, or you want to debate the merits of my existence (sniffle), please contact [email protected]
Ok, fixed!
@svmn Thanks for posting, we'll take a look as soon as possible.
For help with questions about Sails, click here. If you’re interested in hiring @sailsbot and her minions in Austin, click here.
Maybe there is some configuration to not take command line arguments for config?
@svmn not currently- sorry for the inconvenience! I totally agree-- and in fact, I'd like to phase out general-purpose command-line-opt-style configuration in general (and just keep support a few special things, like --staging, --prod, --redis, --drop, etc). Doing that would be a breaking change, though, which would mean Sails 2.0.
In the mean time, I'd love to merge a PR that adds a sails.config.enableDeepCommandLineOptions that is true by default, but that, if disabled, replaces this with a shallow merge, rather than a deep merge -- in other words, instead of _.merge(), do _.extend() aka Object.assign(). (Last but not least, remember we'd also need to add the new config to the docs.)
Most helpful comment
@svmn not currently- sorry for the inconvenience! I totally agree-- and in fact, I'd like to phase out general-purpose command-line-opt-style configuration in general (and just keep support a few special things, like
--staging,--prod,--redis,--drop, etc). Doing that would be a breaking change, though, which would mean Sails 2.0.In the mean time, I'd love to merge a PR that adds a
sails.config.enableDeepCommandLineOptionsthat istrueby default, but that, if disabled, replaces this with a shallow merge, rather than a deep merge -- in other words, instead of_.merge(), do_.extend()akaObject.assign(). (Last but not least, remember we'd also need to add the new config to the docs.)