Skip to content

Commit 2e2bf30

Browse files
committed
copier: fix linter warnings
Fix a "that doesn't take %w" warning. Fix two "you forgot to pass that error to the formatter" warnings. Signed-off-by: Nalin Dahyabhai <[email protected]>
1 parent 8707127 commit 2e2bf30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

copier/copier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ func copierHandlerStat(req request, pm *fileutils.PatternMatcher, idMappings *id
11681168
hostPair := idtools.IDPair{UID: uid, GID: gid}
11691169
uid, gid, err = idMappings.ToContainer(hostPair)
11701170
if err != nil {
1171-
return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %w", hostPair, err)
1171+
return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %v", hostPair, err)
11721172
}
11731173
}
11741174
result.UID, result.GID = int64(uid), int64(gid)
@@ -2227,7 +2227,7 @@ func copierHandlerMkdir(req request, idMappings *idtools.IDMappings) (*response,
22272227
return errorResponse("copier: mkdir: error setting owner of %q to %d:%d: %v", path, dirUID, dirGID, err)
22282228
}
22292229
if err = chmod(path, dirMode); err != nil {
2230-
return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode)
2230+
return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode, err)
22312231
}
22322232
created = append(created, path)
22332233
} else {
@@ -2409,7 +2409,7 @@ func copierHandlerEnsure(req request, idMappings *idtools.IDMappings) *response
24092409
return errorResponse("copier: ensure: error setting owner of %q to %d:%d: %v", leaf, uid, gid, err)
24102410
}
24112411
if err = chmod(filepath.Join(req.Root, leaf), mode); err != nil {
2412-
return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode)
2412+
return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode, err)
24132413
}
24142414
if item.ModTime != nil {
24152415
if err := os.Chtimes(filepath.Join(req.Root, leaf), *item.ModTime, *item.ModTime); err != nil {

0 commit comments

Comments
 (0)