Skip to content
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

.husky/pre-commit in a newly generated app is not executable #3981

Closed
andrewhamon opened this issue Nov 21, 2022 · 1 comment
Closed

.husky/pre-commit in a newly generated app is not executable #3981

andrewhamon opened this issue Nov 21, 2022 · 1 comment
Labels
kind/bug Something isn't working status/done

Comments

@andrewhamon
Copy link

andrewhamon commented Nov 21, 2022

What is the problem?

In a new project, .husky/pre-commit and .husky/pre-push are not executable, which prevents the hooks from running.

Paste all your error logs here:

hint: The '.husky/pre-commit' hook was ignored because it's not set as executable.
hint: You can disable this warning with `git config advice.ignoredHook false`.

Paste all relevant code snippets here:

No relevant code snippers

What are detailed steps to reproduce this?

npx blitz new my-test-app # use default for all choices
cd my-test-app
touch some-new-file
git add some-new-file
git commit -m "add some-new-file

Run blitz -v and paste the output here:

Blitz version: 2.0.0-beta.18 (local)
macOS Monterey | darwin-arm64 | Node: v18.12.1


 Package manager: npm

  System:
    OS: macOS 12.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 5.00 GB / 64.00 GB
    Shell: 5.8.1 - /run/current-system/sw/bin/zsh
  Binaries:
    Node: 18.12.1 - /var/folders/0g/758sdwpd3snckpsnb716xjwr0000gp/T/yarn--1668990684131-0.6362546526395787/node
    Yarn: 1.22.19 - /var/folders/0g/758sdwpd3snckpsnb716xjwr0000gp/T/yarn--1668990684131-0.6362546526395787/yarn
    npm: 8.19.2 - ~/.nix-profile/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.0-beta.18 => 2.0.0-beta.18
    @blitzjs/next: 2.0.0-beta.18 => 2.0.0-beta.18
    @blitzjs/rpc: 2.0.0-beta.18 => 2.0.0-beta.18
    @prisma/client: 4.6.0 => 4.6.0
    blitz: 2.0.0-beta.18 => 2.0.0-beta.18
    next: 12.2.5 => 12.2.5
    prisma: 4.6.0 => 4.6.0
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: ^4.8.4 => 4.9.3

✨  Done in 0.47s.

Please include below any other applicable logs and screenshots that show your problem:

Its easy enough to fix by running the following:

chmod +x .husky/pre-commit
chmod +x .husky/pre-push
@andrewhamon andrewhamon added kind/bug Something isn't working status/triage labels Nov 21, 2022
@itsdillon
Copy link
Member

@andrewhamon We're actually going to remove the husky hook completely from the new generated app template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working status/done
Projects
Status: Done
Development

No branches or pull requests

4 participants