Skip to content

Setting environment variable CFV_GLOBBING does not work #233

@kehoecj

Description

@kehoecj

All config-file-validator CLI flags and arguments should have an equivalent environment variable. Setting export CFV_GLOBBING=true does not enable globbing:

/test # export CVF_GLOBBING=true && cd /test && /validator "fixtures/**/.json"
2024/12/18 17:47:25 An error occurred during CLI execution: Unable to find files: stat fixtures/**/.json: no such file or directory

But setting the flag directly does:

/test # cd /test && /validator --globbing "fixtures/**/*.json"
    ✓ /test/fixtures/good.json
    ✓ /test/fixtures/exclude-file-types/excluded.json
    × /test/fixtures/subdir/bad.json
        error: Error at line 3 column 14: invalid character ':' after array element
    ✓ /test/fixtures/subdir/good.json
    × /test/fixtures/subdir2/bad.json
        error: Error at line 1 column 3: invalid character '}' looking for beginning of value
    ✓ /test/fixtures/subdir2/good.json
    ✓ /test/fixtures/with-depth/sample.json
    ✓ /test/fixtures/with-depth/additional-depth/sample.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions