eficode-academy/git-katas

submodules kata: sourcing setup.sh doesn't work

ftheile opened this issue · 1 comments

I found this problem using Git version 2.22.0.windows.1 on Windows 10 1803.

If I source setup.sh as documented in README.md, I get this:

$ . setup.sh
/usr/bin
mkdir: cannot create directory ‘/usr/bin/exercise’: Permission denied
bash: cd: /usr/bin/exercise: No such file or directory
Initialized empty Git repository in C:/Users/.../git-katas/submodules/component/.git/
[master (root-commit) 499d5ac] Touch component header.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 component.h
Initialized empty Git repository in C:/Users/.../git-katas/submodules/product/.git/
[master (root-commit) dd921ae] Touch product header.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 product.h

Folder structure:

C:\Users\...\git-katas\submodules>tree /f
Folder PATH listing for volume Local Disk
Volume serial number is B87A-98D7
C:.
│   README.md
│   setup.ps1
│   setup.sh
│
├───component
│       component.h
│
└───product
        product.h

However, if I run setup.sh, everything is fine:

$ ./setup.sh
/c/Users/.../git-katas/submodules
Initialized empty Git repository in C:/Users/.../git-katas/submodules/exercise/component/.git/
[master (root-commit) 42b8244] Touch component header.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 component.h
Initialized empty Git repository in C:/Users/.../git-katas/submodules/exercise/product/.git/
[master (root-commit) 85390fb] Touch product header.
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 product.h

Folder structure:

C:\Users\...\git-katas\submodules>tree /f
Folder PATH listing for volume Local Disk
Volume serial number is B87A-98D7
C:.
│   README.md
│   setup.ps1
│   setup.sh
│
└───exercise
    ├───component
    │       component.h
    │
    └───product
            product.h

Thanks @ftheile will make a small note in the exercise about that :)