diff --git a/configs/husky/init.sh b/configs/husky/init.sh new file mode 100644 index 0000000..c04b51c --- /dev/null +++ b/configs/husky/init.sh @@ -0,0 +1,5 @@ +# Runs before husky hooks, in non-interative shell environments like Sourcetree +# https://typicode.github.io/husky/how-to.html#node-version-managers-and-guis + +# Add mise shims to PATH +export PATH="$HOME/.local/share/mise/shims:$PATH" diff --git a/dotfiles/.huskyrc b/dotfiles/.huskyrc index 463fd8f..d2889d0 100644 --- a/dotfiles/.huskyrc +++ b/dotfiles/.huskyrc @@ -1,5 +1,5 @@ # Runs before husky hooks, in non-interative shell environments like Sourcetree -# https://typicode.github.io/husky/troubleshooting.html#command-not-found +# TODO: Remove this file when all your projects are using husky v9 # Add mise shims to PATH export PATH="$HOME/.local/share/mise/shims:$PATH" diff --git a/scripts/shell.sh b/scripts/shell.sh index 2e1a3f6..3222eeb 100755 --- a/scripts/shell.sh +++ b/scripts/shell.sh @@ -12,6 +12,8 @@ for file in "$REPO_PATH"/dotfiles/.*; do done # Symlink mise and Starship configs +mkdir -p "$HOME/.config/husky" +ln -sf "$REPO_PATH/configs/husky/init.sh" "$HOME/.config/husky/init.sh" mkdir -p "$HOME/.config/mise" ln -sf "$REPO_PATH/configs/mise/config.toml" "$HOME/.config/mise/config.toml" ln -sf "$REPO_PATH/configs/mise/settings.toml" "$HOME/.config/mise/settings.toml"