emulsify-ds / emulsify-cli

Command line interface for Emulsify
GNU General Public License v2.0
4 stars 4 forks source link

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

Open calebtr-metro opened 5 months ago

calebtr-metro commented 5 months ago

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