Egge on Nostr: I spent a full afternoon trying to pass the absolute root path of my monorepo to all ...
I spent a full afternoon trying to pass the absolute root path of my monorepo to all its modules. After getting build steps and docker deploys working, I failed at getting nodemon / dotenv to recognise my root level .env file.
Then I finally found a workaround: $(git rev-parse --show-toplevel)
This returns the absolute path of the repos root directory, no matter where in the tree you currently are. No need to pass the path from root, as each module of the repo can figure it out on its own now
Then I finally found a workaround: $(git rev-parse --show-toplevel)
This returns the absolute path of the repos root directory, no matter where in the tree you currently are. No need to pass the path from root, as each module of the repo can figure it out on its own now