Skip to content

GitHub https downloads break when there is a / in the branch name. #422

@lazzurs

Description

@lazzurs

The issue appears to be with the logic here on splitting the URL based on / here

func (d *GitHubDetector) detectHTTP(src string) (string, bool, error) {

When using this in Terragrunt the following works

source = "github.com/xxx/infrastructure-modules//dev-dns-zone?ref=v0.0.1"

But this does not

source = "github.com/xxx/infrastructure-modules//dev-dns-zone?ref=feat/PTP-1841"

The error in Terragrunt clearly shows the branch name is having the part after / chopped off.

ERRO[0001] 1 error occurred:
* error downloading 'https://github.com/xxx/infrastructure-modules.git?ref=feat': /opt/homebrew/bin/git exited with 1: error: pathspec 'feat' did not match any file(s) known to git

ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1

Issue raised in Terragrunt for this is gruntwork-io/terragrunt#2473

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions