Refactor git command stderr handling (#36402)
And clean up legacy fragile & incorrect logic
This commit is contained in:
@@ -36,12 +36,7 @@ func CreateArchive(ctx context.Context, repo Repository, format string, target i
|
||||
paths[i] = path.Clean(paths[i])
|
||||
}
|
||||
cmd.AddDynamicArguments(paths...)
|
||||
|
||||
var stderr strings.Builder
|
||||
if err := RunCmd(ctx, repo, cmd.WithStdout(target).WithStderr(&stderr)); err != nil {
|
||||
return gitcmd.ConcatenateError(err, stderr.String())
|
||||
}
|
||||
return nil
|
||||
return RunCmdWithStderr(ctx, repo, cmd.WithStdout(target))
|
||||
}
|
||||
|
||||
// CreateBundle create bundle content to the target path
|
||||
|
||||
Reference in New Issue
Block a user