Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: allow --config option to take error codes (e.g., NIFTI_UNIT) on top of numeric codes (e.g., 99) #802

Open
3 of 4 tasks
jasmainak opened this issue Jul 20, 2019 · 1 comment
Labels
effort: medium Estimated medium effort task impact: medium Estimated medium impact task legacy

Comments

@jasmainak
Copy link
Collaborator

jasmainak commented Jul 20, 2019

Currently there are a number of issues with the --config flag in the CLI:

$ bids-validator --config.error=NIFTI_UNIT path/to/bids/dir
(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.
@toujames
Copy link

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 sappelhoff added effort: low Estimated low effort task impact: high Estimated high impact task effort: medium Estimated medium effort task and removed effort: low Estimated low effort task labels Feb 5, 2021
@sappelhoff 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
@sappelhoff sappelhoff added impact: medium Estimated medium impact task and removed impact: high Estimated high impact task labels Feb 5, 2021
@effigies effigies added the legacy label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium Estimated medium effort task impact: medium Estimated medium impact task legacy
Projects
None yet
Development

No branches or pull requests

4 participants