Skip to content

panic when running build-docker-create command if image name does not include slash or colon #86

Open

Description

Describe the bug
A clear and concise description of what the bug is.

return path.Join(image.tag[indexOfFirstSlash:], "latest")

This line will panic if image.tag does not contain any slashes or colons.

To Reproduce
Steps to reproduce the behavior

Run the jfrog rt bdc command with an image file where the name doesn't include a slash.

Expected behavior
A clear and concise description of what you expected to happen.

It should give an error about the invalid input, but should not crash.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions

  • JFrog CLI core version: 1.4.0
  • JFrog CLI version (if applicable): 1.45.0
  • Artifactory version: n/a

Additional context
Add any other context about the problem here.

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions