Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error messaging for remove #435

Closed
decleaver opened this issue Feb 16, 2024 · 0 comments · Fixed by #490
Closed

Improved error messaging for remove #435

decleaver opened this issue Feb 16, 2024 · 0 comments · Fixed by #490

Comments

@decleaver
Copy link
Collaborator

Environment

uds v0.9.0

Steps to reproduce

  1. Run uds remove on an invalid bundle

Expected result

Error messaging indicating that you're attempting to run remove with an invalid bundle name/path

Actual Result

panic: runtime error: slice bounds out of range [:6] with length 4

goroutine 1 [running]:
github.com/defenseunicorns/uds-cli/src/pkg/utils.EnsureOCIPrefix(...)
        /home/runner/work/uds-cli/uds-cli/src/pkg/utils/oci.go:250
github.com/defenseunicorns/uds-cli/src/pkg/bundle.getOCIValidatedSource({0x16bbb2ea8, 0x4})
        /home/runner/work/uds-cli/uds-cli/src/pkg/bundle/remote.go:263 +0x420
github.com/defenseunicorns/uds-cli/src/pkg/bundle.CheckOCISourcePath({0x16bbb2ea8, 0x4})
        /home/runner/work/uds-cli/uds-cli/src/pkg/bundle/remote.go:330 +0x40
github.com/defenseunicorns/uds-cli/src/pkg/bundle.(*Bundle).Remove(0x140017a6000)
        /home/runner/work/uds-cli/uds-cli/src/pkg/bundle/remove.go:28 +0x38
github.com/defenseunicorns/uds-cli/src/cmd.glob..func13(0x10b9b9d40?, {0x140003f3aa0?, 0x4?, 0x10754ba68?})
        /home/runner/work/uds-cli/uds-cli/src/cmd/uds.go:129 +0x158
github.com/spf13/cobra.(*Command).execute(0x10b9b9d40, {0x140003f3a40, 0x2, 0x2})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x10b9ba8c0)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/defenseunicorns/uds-cli/src/cmd.Execute()
        /home/runner/work/uds-cli/uds-cli/src/cmd/root.go:60 +0x24
main.main()
        /home/runner/work/uds-cli/uds-cli/main.go:10 +0x1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant