Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix init.sh when running not in git repo #10

Open
VisualDudek opened this issue Sep 12, 2023 · 0 comments
Open

Fix init.sh when running not in git repo #10

VisualDudek opened this issue Sep 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@VisualDudek
Copy link

NOTICE: this is my first issue ever

Description:
When you run curl -sL https://raw.githubusercontent.com/awslabs/aws-terraform-dev-container/main/scripts/init.sh | bash according to Getting Started BUT not from git repo, than line 12 from init.sh will fail due to git submodule cannot be run outside git repo.

line 12 from inti.sh
git submodule add --name habits -b main https://github.com/awslabs/aws-code-habits.git habits

Steps to Reproduce:

cd /tmp
cd `mktemp -d`
curl -sL https://raw.githubusercontent.com/awslabs/aws-terraform-dev-container/main/scripts/init.sh | bash

output:

Cloning into 'aws-terraform-dev-container'...
remote: Enumerating objects: 48, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (45/45), done.
remote: Total 48 (delta 0), reused 29 (delta 0), pack-reused 0
Receiving objects: 100% (48/48), 2.02 MiB | 3.63 MiB/s, done.
fatal: not a git repository (or any of the parent directories): .git

last line indicates on error wihile trying to git submodule

Environment:
22.04.1-Ubuntu

Comments:
I will create pull request that will enabales to clone habits even while not being in git repo (.git dir not found).

@VisualDudek VisualDudek added the enhancement New feature or request label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant