Skip to content
Merged
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
7 changes: 5 additions & 2 deletions cmd/nvidia-cdi-hook/update-ldcache/update-ldcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ func (m command) run(_ *cli.Command, cfg *options) error {
}

containerRootDir, err := s.GetContainerRoot()
if err != nil || containerRootDir == "" || containerRootDir == "/" {
return fmt.Errorf("failed to determined container root: %v", err)
if err != nil {
return fmt.Errorf("failed to determine container root: %w", err)
}
if containerRootDir == "" || containerRootDir == "/" {
return errors.New("failed to determine container root: invalid root")
}

runner, err := ldconfig.NewRunner(
Expand Down
Loading