Skip to content

Can't create commit on windows github desktop env, pre-commit hook throw error #121

@albertlast

Description

@albertlast

Describe the bug

this pre-commit is realy new for me,
but it force the existing of cygpath,
which is still a open bug (eaven the issue got closed): desktop/desktop#10326
so cygpath had to be moved manuel to get the test running on windows env

workaround: desktop/desktop#10326 (comment)

Screenshots

grafik

Reproduction

Create a git commit in a windows env

Logs

/d/Programme/nodejs/npx: line 5: cygpath: command not found
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'C:\Users\*****\AppData\Local\GitHubDesktop\app-3.2.3\resources\app\git\node_modules\npm\bin\npx-cli.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.15.0
husky - pre-commit hook exited with code 1 (error)

Have you checked if this issue has already been raised?

  • I did not find any similar issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions