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

Fix git+file bug with non-current windows drives #1916

Merged
merged 1 commit into from
Nov 20, 2023

Conversation

hairyhenderson
Copy link
Owner

When using a git+file:// datasource on Windows, gomplate will fail to find file that are on non-current drives.

e.g. when running on the C: drive, issuing commands like this will fail:

C:\> gomplate -d config=git+file:///F:/myrepo ...

Turns out this is due to a known bug go-git/go-git#415, which is fixed (but not yet merged) in go-git/go-git#416.

I've forked the go-git repo, and cherry-picked the merge on top of the v5.10.0 tag, and will use that patched version in gomplate for now, until the upstream PR is merged.

This "worked" previously because the URL was actually malformed in the associated test - it was sending git+file://D:/tmp/... which has a host reference to D:, and a path of /tmp/.... It was working in CI because the tmp dir is on D: and the tests are run from D: as well.

@hairyhenderson hairyhenderson self-assigned this Nov 20, 2023
@hairyhenderson hairyhenderson force-pushed the fix-go-git-file-url-bug branch 2 times, most recently from 726e4fe to 8005e73 Compare November 20, 2023 01:26
@hairyhenderson hairyhenderson force-pushed the fix-go-git-file-url-bug branch from 8005e73 to e7860d0 Compare November 20, 2023 01:47
@hairyhenderson hairyhenderson enabled auto-merge (squash) November 20, 2023 01:48
@hairyhenderson hairyhenderson merged commit f02b5c4 into main Nov 20, 2023
@hairyhenderson hairyhenderson deleted the fix-go-git-file-url-bug branch November 20, 2023 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant