Skip to content

[BUG] emulsify-cli assumes that a custom starter theme's default branch is 'master' #280

@calebtr-metro

Description

@calebtr-metro

Describe the bug
emulsify-cli assumes that a custom starter theme's default branch is 'master'.

The error is:

fatal: Remote branch master not found in upstream origin

However if you specify a --checkout, then starter theme is installed correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Initialize a project with a custom starter theme repository where the default branch is not "master"; verify that it is valid by specifying a checkout on the command line:

    emulsify init -p drupal --starter git@github.com:calebtr-metro/emulsify-starter-demonstration.git --checkout main . test-success

  2. Initialize a project with the same repository but leave out the --checkout flag:

    emulsify init -p drupal --starter git@github.com:calebtr-metro/emulsify-starter-demonstration.git . test-fail

  3. See error.

fatal: Remote branch master not found in upstream origin

Expected behavior
emulsify-cli should identify a repository's correct default branch / HEAD.

Additional context

  • node v20.11.1
  • emulsify v1.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions