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

feat(config): Allow avoiding reading default config file #2227

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

hairyhenderson
Copy link
Owner

In #2202 the root issue was that the user was running in an unreadable working directory, and so gomplate errored with a message like:

Error: fsys for path .gomplate.yaml: resolve local path ".gomplate.yaml": getwd: stat .: permission denied

Rather than ignore errors when the default config file can't be read (which will hide real failures and perform the wrong behaviour potentially), this PR adds the ability to set --config or $GOMPLATE_CONFIG to an empty string, which will cause the config file parsing code to be skipped entirely.

@hairyhenderson hairyhenderson self-assigned this Sep 28, 2024
@hairyhenderson hairyhenderson force-pushed the skip-config-file-if-empty-config-flag-2202 branch from e6e5d22 to 0054e25 Compare September 28, 2024 17:46
@hairyhenderson hairyhenderson force-pushed the skip-config-file-if-empty-config-flag-2202 branch from eecbf19 to 8cf6bc9 Compare September 30, 2024 14:48
@hairyhenderson hairyhenderson merged commit 18791a4 into main Sep 30, 2024
20 checks passed
@hairyhenderson hairyhenderson deleted the skip-config-file-if-empty-config-flag-2202 branch September 30, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant