Skip to content

Commit 45a8761

Browse files
committed
sbom command discontinued
1 parent 893b8be commit 45a8761

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# :warning: Discontinued
2+
3+
The `docker sbom` command has been removed, please use the [`docker scout sbom` command](https://docs.docker.com/reference/cli/docker/scout/sbom/)
4+
instead.
5+
16
# sbom-cli-plugin
27

38
Plugin for Docker CLI to support viewing and creating SBOMs for Docker images using Syft.

cmd/root.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"strings"
99
"text/template"
1010

11+
"github.com/docker/cli/cli"
1112
"github.com/docker/cli/cli/command"
1213
"github.com/docker/sbom-cli-plugin/internal"
1314
"github.com/docker/sbom-cli-plugin/internal/bus"
@@ -50,7 +51,15 @@ func cmd(dockerCli command.Cli) *cobra.Command {
5051
SilenceUsage: true,
5152
SilenceErrors: true,
5253
Version: version.FromBuild().Version,
53-
RunE: newRunner(dockerCli).run,
54+
RunE: func(cmd *cobra.Command, args []string) error {
55+
if len(args) == 0 {
56+
return cmd.Help()
57+
}
58+
return cli.StatusError{
59+
StatusCode: 1,
60+
Status: `error: docker sbom has been removed, please use "docker scout sbom" command instead`,
61+
}
62+
},
5463
}
5564

5665
c.SetVersionTemplate(fmt.Sprintf("%s {{.Version}}, build %s\n", internal.ApplicationName, version.FromBuild().GitCommit))

0 commit comments

Comments
 (0)