Closed patzielinski closed 1 month ago
I need to tinker a bit more with this, marking as draft.
Turns out that all that was needed was a deferred call to an os.Chdir
to the global temp dir as open folders cannot be deleted on Windows, unlike *nix based systems.
@adityasaky Do we still want to move the tempfile creation into CreateTestGitRepository
? We do provide the directory so we still know where the repo will be...
https://github.com/gittuf/gittuf/blob/main/internal/gitinterface/common.go#L47-L49
is it because we never reverse this then? Because we can replace that chdir with git init -b main <dir>
no?
https://github.com/gittuf/gittuf/blob/main/internal/gitinterface/common.go#L47-L49
is it because we never reverse this then? Because we can replace that chdir with
git init -b main <dir>
no?
Yep, that's exactly why.
This PR fixes CI on Windows failing due to a test in
gitinterface
by manually working with the temporary directory.Addresses #407.