volta
volta copied to clipboard
Question: where can I find hooks.json defaults?
Hi! I've been browsing the repository in the seek the default hooks.json file. Unfortunately, I was not able to find it. My guess is that the default values for this file are hardcoded in volta's code somewhere, but I wanted to ask before start speculating 😅
My intention is to overwrite hooks file in a specific project, because I have a mac M1 and I need x64 binaries just for it (running with rosetta). I thought this was about to be a simple change... My (naive) mental process:
- Go find the default hooks.json files (failed)
- Replace {{arch}} by a nice hardcoded x64
- Put that file in <my_project_path>/.volta/hooks.json
- Continue with my life 🌈
Since apparently it's not that easy I am taking this opportunity to fix my knowledge gap and try to understand how that part of volta works 😄
Thank you in advance!
Update: I temporary replaced the binary with the x64 one and that made the trick, but I would be still interested in understanding the aforementioned behaviour better
This would be a great addition to our docs. @charlespierce is there an internal "source of truth" for this in the code we could use to emit the definition via a command line flag (as a lot of tools do when emitting config defaults)? I would assume so, and obviously the information all exists somewhere, but I do not know off the top of my head if it exists in a single coherent place to make it easy.