I’m doing “Build Your Own Git” in TypeScript.
The README states:
Run
./your_git.sh
to run your Git implementation, which is implemented inapp/main.ts
.
Inside your_git.sh
, though, the command is:
#!/bin/sh
#
# DON'T EDIT THIS!
#
# CodeCrafters uses this file to test your code. Don't make any changes here!
#
# DON'T EDIT THIS!
exec bun run /app/app/main.ts "$@"
Which is what CodeCrafters uses it to run it on the CI, probably inside a Docker container.
My point being that this command doesn’t work locally, as there is no /app/app/main.ts
locally.
There is an (undocumented) npm script to run the project:
"scripts": {
"dev": "bun run app/main.ts"
}
The README goes on about how I should create a mygit
alias to point to your_git.sh
, which, again, won’t work locally. Also, aliasing npm run dev
won’t work as expected if I run it from another folder.
All in all, it is frustrating to spend time following a documentation that is not working properly, so I suggest you give it a look.
Thanks