Skip to content

Commit d972e58

Browse files
committed
why2
Signed-off-by: Guillaume de Rouville <guillaume@dagger.io>
1 parent 133ccfb commit d972e58

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

repository/repository.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,21 @@ func (r *Repository) ensureUserRemote(ctx context.Context) error {
152152
if !errors.Is(err, os.ErrNotExist) {
153153
return err
154154
}
155-
155+
// // Convert Windows paths to file:// URLs for git remotes
156156
remotePath := r.forkRepoPath
157+
// if runtime.GOOS == "windows" {
158+
// remotePath = "file://" + filepath.ToSlash(r.forkRepoPath)
159+
// }
157160
_, err := RunGitCommand(ctx, r.userRepoPath, "remote", "add", containerUseRemote, remotePath)
158161
return err
159162
}
160163

161164
if currentForkPath != r.forkRepoPath {
165+
// // Convert Windows paths to file:// URLs for git remotes
162166
remotePath := r.forkRepoPath
167+
// if runtime.GOOS == "windows" {
168+
// remotePath = "file://" + filepath.ToSlash(r.forkRepoPath)
169+
// }
163170
_, err := RunGitCommand(ctx, r.userRepoPath, "remote", "set-url", containerUseRemote, remotePath)
164171
return err
165172
}

0 commit comments

Comments
 (0)