gh extensions list: Don't error if no extensions installed (#5445)
This commit is contained in:
parent
868a03c0ca
commit
8f046e0b77
1 changed files with 5 additions and 3 deletions
|
|
@ -47,7 +47,9 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command {
|
|||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
cmds := m.List()
|
||||
if len(cmds) == 0 {
|
||||
return errors.New("no extensions installed")
|
||||
cs := io.ColorScheme()
|
||||
fmt.Fprintf(io.ErrOut, "%s No installed extensions found\n", cs.WarningIcon())
|
||||
return nil
|
||||
}
|
||||
cs := io.ColorScheme()
|
||||
t := utils.NewTablePrinter(io)
|
||||
|
|
@ -80,10 +82,10 @@ func NewCmdExtension(f *cmdutil.Factory) *cobra.Command {
|
|||
Short: "Install a gh extension from a repository",
|
||||
Long: heredoc.Doc(`
|
||||
Install a GitHub repository locally as a GitHub CLI extension.
|
||||
|
||||
|
||||
The repository argument can be specified in "owner/repo" format as well as a full URL.
|
||||
The URL format is useful when the repository is not hosted on github.com.
|
||||
|
||||
|
||||
To install an extension in development from the current directory, use "." as the
|
||||
value of the repository argument.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue