Fixing windows build

The package github.com/pkg/errors was removed via the pull request #13460.
This change did not correctly handle the case in the windows code and CI
did not exercise this to find the error.

Signed-off-by: Matt Farina <matt.farina@suse.com>
pull/30803/head
Matt Farina 5 months ago
parent e865a0f540
commit ed356cfca8
No known key found for this signature in database
GPG Key ID: 92C44A3D421FF7F9

@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package fs
import (
"errors"
"fmt"
"os"
"syscall"
)
@ -60,7 +60,7 @@ func renameFallback(err error, src, dst string) error {
// 0x11 (ERROR_NOT_SAME_DEVICE) is the windows error.
// See https://msdn.microsoft.com/en-us/library/cc231199.aspx
if ok && noerr != 0x11 {
return errors.Wrapf(terr, "link error: cannot rename %s to %s", src, dst)
return fmt.Errorf("link error: cannot rename %s to %s: %w", src, dst, terr)
}
}

Loading…
Cancel
Save