it needs to be possible to switch branches from any folder and the hooks should run normally.
scripts + hooks
Please @FFawzy help us to remember what this issue was about.
@nkuehn was switching between different branches locally and the scripts + hooks did not run like we have in the docs. and he told me to create the ticket
if its not reproduce-able anymore we can close it
Cannot confirm that it works.
if I run yarn from a subfolder it can't find the postinstall script, that only works in the root folder.
➤ YN0000: Done with warnings in 1s 759ms
command not found: ./scripts/postinstall.sh
This leads to package.json files looking modified after an install although they are not changed (yarn is formatting them differently than prettier).
We use this plugin to have the postinstall script run after every install https://github.com/GravitywellUK/yarn-plugin-postinstall (vs. just when deps change). It seems to be not very workspace-aware.
We could leave it in place and let package.json files be formatted by yarn instead. we'd have to live with the fact that some users's initial checkout may not have husky installed for the other hooks if their very first install is from a different directory (unlikely). But we'd have to instruct prettier to not touch package.json files then in other situations.