`gh extension install` returns an error in case extension exist · Issue #4463 · cli/cli · GitHub
Skip to content

gh extension install returns an error in case extension exist #4463

Description

@YuviGold

Describe the bug

When trying to install an extension that is already being installed, an error is returned.

➜  gh --version
gh version 2.0.0 (2021-08-24)
https://github.com/cli/cli/releases/tag/v2.0.0

Steps to reproduce the behavior

  1. Install an extension with gh extension install
  2. Try to install it once again

Expected vs actual behavior

The program shouldn't exit with 1 but with 0 since the program is already installed.

Logs

➜  gh extension install mislav/gh-branch

Cloning into '/home/test/.local/share/gh/extensions/gh-branch'...
remote: Enumerating objects: 40, done.
remote: Counting objects: 100% (40/40), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 40 (delta 13), reused 26 (delta 8), pack-reused 0
Receiving objects: 100% (40/40), 7.99 KiB | 4.00 MiB/s, done.
Resolving deltas: 100% (13/13), done.
➜  gh extension install mislav/gh-branch

there is already an installed extension that provides the "branch" commandecho $?
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-extensionrelating to the gh extension commandpriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions