Skip to content
New issue

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

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

Already on GitHub? # to your account

Setting environment variable CFV_GLOBBING does not work #233

Closed
kehoecj opened this issue Dec 18, 2024 · 0 comments · Fixed by #235
Closed

Setting environment variable CFV_GLOBBING does not work #233

kehoecj opened this issue Dec 18, 2024 · 0 comments · Fixed by #235
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@kehoecj
Copy link
Collaborator

kehoecj commented Dec 18, 2024

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
@kehoecj kehoecj added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Dec 18, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant