Skip to content

Improve invalid container root errors in update-ldcache hook #2115

Description

@cdesiniotis

The update-ldcache hook currently has one if statement to handle container root resolution errors and invalid root values (e.g. "" or /).

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

An empty root or / can therefore produce a message ending in <nil>. This one error branch should be split into two.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions