Skip to content

Commit bb2fc73

Browse files
committed
Return a wrapped fs.ErrNotExist if no spec directories are defined
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent c8daf1d commit bb2fc73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/cdi/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func (c *Cache) RemoveSpec(name string) error {
321321

322322
specDir, _ = c.highestPrioritySpecDir()
323323
if specDir == "" {
324-
return errors.New("no Spec directories to remove from")
324+
return fmt.Errorf("no Spec directories defined: %w", fs.ErrNotExist)
325325
}
326326

327327
path = filepath.Join(specDir, name)

0 commit comments

Comments
 (0)