Skip to content

Commit e41fac0

Browse files
committed
chore: cas fixes
1 parent 692c61c commit e41fac0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

internal/cas/cas.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (c *CAS) Clone(ctx context.Context, l log.Logger, opts *CloneOptions, url s
117117

118118
if c.store.NeedsWrite(hash) {
119119
// Create a temporary directory for git operations
120-
tempDir, cleanup, createTempDirErr := c.git.CreateTempDir()
120+
_, cleanup, createTempDirErr := c.git.CreateTempDir()
121121
if createTempDirErr != nil {
122122
return createTempDirErr
123123
}
@@ -128,8 +128,6 @@ func (c *CAS) Clone(ctx context.Context, l log.Logger, opts *CloneOptions, url s
128128
}
129129
}()
130130

131-
c.git.WithWorkDir(tempDir)
132-
133131
if cloneAndStoreErr := c.cloneAndStoreContent(childCtx, l, opts, url, hash); cloneAndStoreErr != nil {
134132
return cloneAndStoreErr
135133
}

internal/git/git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (g *GitRunner) CreateTempDir() (string, func() error, error) {
209209
}
210210
}
211211

212-
g.WithWorkDir(tempDir)
212+
g.WorkDir = tempDir
213213

214214
cleanup := func() error {
215215
if err := os.RemoveAll(tempDir); err != nil {

0 commit comments

Comments
 (0)