fix: unknown pathspec on tags (#58)

forces to fetch tags from the remote. This was dependent on `git-config` before and led to issues with some users where tags were not be fetched
This commit is contained in:
Hang Xie 2019-11-08 06:44:37 -08:00 committed by sh0rez
parent f4417ac665
commit 013e3937e8

View file

@ -241,7 +241,7 @@ func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (st
} }
// Attempt shallow fetch at specific revision // Attempt shallow fetch at specific revision
cmd = exec.CommandContext(ctx, "git", "fetch", "--depth", "1", "origin", version) cmd = exec.CommandContext(ctx, "git", "fetch", "--tags", "--depth", "1", "origin", version)
cmd.Stdin = os.Stdin cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr