Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/command/credential_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ func ForUser(cmd *exec.Cmd, userName string) error {
// Look up the user's UID and GID
u, err := user.Lookup(userName)
if err != nil {
return fmt.Errorf("failed to look up user %s: %v", userName, err)
return fmt.Errorf("failed to look up user %s: %w", userName, err)
}

uid, err := strconv.Atoi(u.Uid)
if err != nil {
return fmt.Errorf("invalid UID %s: %v", u.Uid, err)
return fmt.Errorf("invalid UID %s: %w", u.Uid, err)
}

gid, err := strconv.Atoi(u.Gid)
if err != nil {
return fmt.Errorf("invalid GID %s: %v", u.Gid, err)
return fmt.Errorf("invalid GID %s: %w", u.Gid, err)
}

// Set the user cmd should run as
Expand Down
2 changes: 1 addition & 1 deletion pkg/survey/survey.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func buildValidator(params *QuestionOptions, compiledRegex *regexp.Regexp) func(
return errors.New(params.ValidationMessage)
}

return fmt.Errorf("%v", err)
return err
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/hash/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (w *fileWalker) shouldSkipPath(relFilePath string) (bool, error) {

skip, err := w.pm.MatchesOrParentMatches(relFilePath)
if err != nil {
return false, fmt.Errorf("failed to match %s: %v", relFilePath, err)
return false, fmt.Errorf("failed to match %s: %w", relFilePath, err)
}

return skip, nil
Expand Down
Loading