golemcloud / docs

Golem Cloud Documentation
https://learn.golem.cloud
10 stars 9 forks source link

Git hooks don't work on windows #45

Closed nicoburniske closed 2 months ago

nicoburniske commented 2 months ago

Need to investigate why this happens, maybe move away from lefthook in favor of something else

nicoburniske commented 2 months ago

@jdegoes do you mind including an error message?

I wonder if the error comes from

this is the pre-commit command

bunx lefthook run pre-commit

this is the pre-build command

bunx lefthook run pre-build
nicoburniske commented 2 months ago

In meantime before you commit I would run the following command

bun run fix
jdegoes commented 2 months ago
PS C:\Users\john\Documents\git\golem-docs> git commit -am "updates"
╭──────────────────────────────────────╮
│ 🥊 lefthook v1.6.1  hook: pre-commit │
╰──────────────────────────────────────╯
│  lint (skip) no files for inspection
(node:46336) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
[error] No files matching the pattern were found: "&&".
[error] No files matching the pattern were found: "git".
[error] No files matching the pattern were found: "add".
┃  prettier ❯

exit status 2┃  typecheck ❯

  ────────────────────────────────────
summary: (done in 4.53 seconds)
✔️  typecheck
🥊  prettier
jdegoes commented 2 months ago

I think bash / shell is used somewhere and obviously that's not going to work on Windows.

jdegoes commented 2 months ago

(The && being bash / shell.)