server: Return the path alongside the error from JobArtifactLocation
Even though the file isn't there it can be useful to have the full path that it was checking for. Related: RHEL-60142
This commit is contained in:
parent
d0be06278c
commit
3781820b45
1 changed files with 1 additions and 1 deletions
|
|
@ -651,7 +651,7 @@ func (s *Server) JobArtifactLocation(id uuid.UUID, name string) (string, error)
|
|||
|
||||
p := path.Join(s.config.ArtifactsDir, id.String(), name)
|
||||
if _, err := os.Stat(p); errors.Is(err, os.ErrNotExist) {
|
||||
return "", fmt.Errorf("Artifact not found: %s", p)
|
||||
return p, fmt.Errorf("Artifact not found: %s", p)
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue