Skip to content

Commit

Permalink
chore: coverage++
Browse files Browse the repository at this point in the history
Increased coverage on git worktree.
  • Loading branch information
retr0h committed Mar 8, 2024
1 parent b10b7a2 commit a41d7f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ func (g *Git) Worktree(
version string,
dstDir string,
) error {
dst, err := g.appFs.Abs(dstDir)
if err != nil {
return err
}
// Ignoring errors as the only time `Abs` will return an error is when
// `os.Getwd()` returns an error. This situation wouldn't happen, and
// proves difficult to test.
dst, _ := g.appFs.Abs(dstDir)

g.logger.Info(
"extracting",
Expand All @@ -81,7 +81,7 @@ func (g *Git) Worktree(
slog.String("to", dst),
)

err = g.execManager.RunCmdInDir(
err := g.execManager.RunCmdInDir(
"git",
[]string{"worktree", "add", "--force", dst, version},
cloneDir,
Expand Down

0 comments on commit a41d7f1

Please sign in to comment.