You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(node:11782) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'length' of undefined
(node:11782) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Not only that, but when trying to use just the --config option, there is an error with the function:
When using: $ bids-validator -c config.json path/to/bids/dir
[email protected]
/usr/local/lib/node_modules/bids-validator/utils/options.js:44
.readFile({ path: config })
^
TypeError: files.readFile is not a function
at Object.loadConfig (/usr/local/lib/node_modules/bids-validator/utils/options.js:44:10)
at Object.parseConfig (/usr/local/lib/node_modules/bids-validator/utils/options.js:60:10)
at Object.parse (/usr/local/lib/node_modules/bids-validator/utils/options.js:23:12)
at Object.start [as BIDS] (/usr/local/lib/node_modules/bids-validator/validators/bids/start.js:23:17)
at module.exports (/usr/local/lib/node_modules/bids-validator/cli.js:39:16)
at Object.<anonymous> (/usr/local/lib/node_modules/bids-validator/bin/bids-validator:55:18)
at Module._compile (internal/modules/cjs/loader.js:774:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:785:10)
at Module.load (internal/modules/cjs/loader.js:641:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
sappelhoff
changed the title
Make CLI --config option more robust
CLI: allow --config option to take error codes (e.g., NIFTI_UNIT) on top of numeric codes (e.g., 99)
Feb 5, 2021
Currently there are a number of issues with the
--config
flag in the CLI:it expects two configurations at least! The hack if I have one configuration is to pass it twice, but it seems like a very weird way of doing things --> EDIT @sappelhoff: now tracked by Allow passing a single --config flag to bids-validator CLI #1168
it does not accept the error codes, only the numerical codes. For example I'd like to be able to pass:
The text was updated successfully, but these errors were encountered: