Skip to content

Commit dd9a5ca

Browse files
authored
fix getting version from .git folder (#4430)
1 parent 189c208 commit dd9a5ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: internal/core/versiongetter/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ func tagFromGit() error {
8282
storer := filesystem.NewStorageWithOptions(storerFs, cache.NewObjectLRUDefault(), filesystem.Options{
8383
AlternatesFS: osfs.New("/", osfs.WithBoundOS()),
8484
})
85-
worktreeFs := osfs.New("../..", osfs.WithBoundOS())
85+
workTreeAbs, _ := filepath.Abs("../../")
86+
worktreeFs := osfs.New(workTreeAbs, osfs.WithBoundOS())
8687
repo, err := git.Open(storer, worktreeFs)
8788
if err != nil {
8889
return fmt.Errorf("failed to open repository: %w", err)

0 commit comments

Comments
 (0)