We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be5b560 commit 0c4797fCopy full SHA for 0c4797f
src/main.ts
@@ -33,15 +33,9 @@ export async function main(): Promise<ValidationResult> {
33
if (options.config) {
34
config = JSON.parse(Deno.readTextFileSync(options.config))
35
} else {
36
- const defaultConfig = join(absolutePath, '.bids-validator-config.json')
37
- try {
38
- await Deno.lstat(defaultConfig)
39
- config = JSON.parse(Deno.readTextFileSync(defaultConfig))
40
- options.config = defaultConfig
41
- } catch {
42
- if (!(err instanceof Deno.errors.NotFound)) {
43
- throw err;
44
- }
+ const configFile = tree.get('.bids-validator-config.json') as BIDSFile
+ if (configFile) {
+ config = await configFile.text().then((text) => JSON.parse(text))
45
}
46
47
0 commit comments