Running terragrunt catalog on a git url will result in a git error after running it a second time:
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
This error goes away after deleting the tmp dir which terragrunt clones the module to
Steps To Reproduce
Run terragrunt catalog <module-src-url>
❯ GIT_CURL_VERBOSE=1 GIT_TRACE=1 terragrunt catalog https://github.com/terraform-aws-modules/terraform-aws-vpc
11:09:10.477 INFO Cloning repository "git::https://github.com/terraform-aws-modules/terraform-aws-vpc.git" to temporary directory "/var/folders/80/8xwm4m4n2yg9qy8l8kmjng0m0000gn/T/catalog764e715034557a556b35447a4b64396a306a496773364638307738/terraform-aws-vpc"
11:09:14.376 INFO Found 2 modules in repository "https://github.com/terraform-aws-modules/terraform-aws-vpc"
Run the same command again
❯ GIT_CURL_VERBOSE=1 GIT_TRACE=1 terragrunt catalog https://github.com/terraform-aws-modules/terraform-aws-vpc
11:09:33.017 INFO Cloning repository "git::https://github.com/terraform-aws-modules/terraform-aws-vpc.git" to temporary directory "/var/folders/80/8xwm4m4n2yg9qy8l8kmjng0m0000gn/T/catalog764e715034557a556b35447a4b64396a306a496773364638307738/terraform-aws-vpc"
11:09:36.916 ERROR error downloading 'https://github.com/terraform-aws-modules/terraform-aws-vpc.git': /opt/homebrew/bin/git exited with 128: 11:09:36.912892 git.c:472 trace: built-in: git checkout ''
fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
11:09:36.916 ERROR Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Workaround is to remove the tmp dir every time you run the command:
## Expected behavior
`terragrunt catalog` should be able to run consecutively with no errors
## Versions
- Terragrunt version: 0.67.4
- OpenTofu/Terraform version: 1.5.4
- Git version: 2.46.0
- Environment details (Ubuntu 20.04, Windows 10, etc.): Mac Sonoma M1
Describe the bug
Running
terragrunt catalog
on a git url will result in a git error after running it a second time:This error goes away after deleting the tmp dir which terragrunt clones the module to
Steps To Reproduce
terragrunt catalog <module-src-url>
11:09:36.916 ERROR Unable to determine underlying exit code, so Terragrunt will exit with error code 1
rm -rf /var/folders/80/8xwm4m4n2yg9qy8l8kmjng0m0000gn/T/catalog764e715034557a556b35447a4b64396a306a496773364638307738/terraform-aws-vpc