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

config: Set HUGO_ENABLEGITINFO=false override in Set_in_string #9070

Conversation

anthonyfok
Copy link
Member

@anthonyfok anthonyfok commented Oct 22, 2021

This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.

To reproduce the error that I encountered before applying this PR:

$ mv .git .git~ ; go test -v ./hugolib -run TestLoadConfigWithOsEnvOverrides ; mv .git~ .git
=== RUN   TestLoadConfigWithOsEnvOverrides
=== RUN   TestLoadConfigWithOsEnvOverrides/Variations
=== RUN   TestLoadConfigWithOsEnvOverrides/Set_in_string
ERROR 2021/10/22 04:52:43 Failed to read Git log: fatal: not a git repository (or any of the parent directories): .git
    config_test.go:750: Build failed: logged 1 error(s)
--- FAIL: TestLoadConfigWithOsEnvOverrides (0.10s)
    --- PASS: TestLoadConfigWithOsEnvOverrides/Variations (0.05s)
    --- FAIL: TestLoadConfigWithOsEnvOverrides/Set_in_string (0.06s)
FAIL
FAIL	github.com/gohugoio/hugo/hugolib	0.141s
FAIL

TestLoadConfigWithOsEnvOverrides/Set_in_string was introduced in commit 49fedbc as fix for #8709.

Many thanks!

This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.
@bep bep merged commit 355ff83 into gohugoio:master Oct 22, 2021
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants