-
Notifications
You must be signed in to change notification settings - Fork 353
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
git-hooks.hooks.prettier.settings.binPath
does not allow value ./node_modules/.bin/prettier
#1670
Comments
Try with: package = null;
entry = "./node_modules/.bin/prettier "; This just templates the correct |
Take tip from comment cachix/devenv#1670 (comment)
Took your tip, @thenonameguy (added a Prettier now tries to parse any file – which is not what I would expect without modifying Thank you for your help so far, @thenonameguy. Even though there is still work to be done, this was a step in the right direction 😄
|
Great, you are welcome! Adding 'types_or = ["json" "yaml"];' should solve the remaining problem. |
Nix flakes, which devenv is built on, don't allow path references (e.g. I've updated the docs for Run |
Describe the bug
Using
git-hooks.hooks.prettier.settings.binPath = ./node_modules/.bin/prettier
(as suggested in https://devenv.sh/reference/options/#git-hookshooksprettiersettingsbinpath) makesdevenv shell
crash with the error messageerror: path '/node_modules' does not exist in Git repository '/Users/myusername/repo'
. Checking innode_modules
makes the shell evaluate, but the pre-commit hook crashes on execution.There may be technical reasons for this behavior, but I have not found an explanation in the documentation. If the error cannot be remedied, I would suggest adding a warning to the documentation for the option.
To reproduce
When
node_modules
is not checked in (the main case).When
node_modules
is checked in:Version
The text was updated successfully, but these errors were encountered: