Skip to content

repo create: local directory for new repo not created when non-interactive and --confirm #2587

@anders-kiaer

Description

@anders-kiaer

Describe the bug

Not sure if it is a bug or undocumented feature: It looks like when capturing the output of gh repo create, local folder is not created (while it is when running without output capture).

gh --version
gh version 1.3.1 (2020-12-03)

Steps to reproduce the behavior

  1. Be outside of an existing local git directory.
  2. Run echo $(gh repo create org/repo --private --confirm)
  3. The repository is created on github.com, but no local folder is initialized/created.

Changing step 2 to gh repo create org/repo --private --confirm will initialize folder locally.

Expected behavior

Consistent behavior (with/without encapsulating the command), or documentation of the "feature" on https://cli.github.com/manual/gh_repo_create.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions