Skip to content

Commit

Permalink
add alias
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <xiaoxuanwang@microsoft.com>
  • Loading branch information
Xiaoxuan Wang committed Aug 13, 2024
1 parent 3fbcee4 commit 0ba2f96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/oras/root/manifest/index/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Example - create an index and push it with multiple tags:
opts.sources = args[1:]
return option.Parse(cmd, &opts)
},
Aliases: []string{"pack"},
RunE: func(cmd *cobra.Command, args []string) error {
return createIndex(cmd, opts)
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/suite/command/manifest_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
var _ = Describe("ORAS beginners:", func() {
When("running manifest index command", func() {
When("running `manifest index create`", func() {
It("should show help doc with feature flags", func() {
ORAS("manifest", "index", "create", "--help").MatchKeyWords(ExampleDesc).Exec()
It("should show help doc with alias", func() {
ORAS("manifest", "index", "create", "--help").MatchKeyWords("Aliases", "pack").Exec()
})
})
})
Expand Down

0 comments on commit 0ba2f96

Please sign in to comment.