internal/linker: show `git apply` stderr on error

Otherwise we don't see why a patch failed to apply.
pull/736/head
Daniel Martí 1 year ago
parent 1526ce7fd2
commit d6fd552245

@ -127,6 +127,9 @@ func applyPatches(srcDir, workingDir string, modFiles map[string]bool, patches [
cmd.Stdin = bytes.NewReader(bytes.Join(patches, []byte("\n")))
out, err := cmd.CombinedOutput()
if err != nil {
if err, ok := err.(*exec.ExitError); ok {
return nil, fmt.Errorf("%v:\n%s", err, out)
}
return nil, err
}

Loading…
Cancel
Save