Sublime Forum

Sublime merge lint-staged cygpath not found

#1

Hi

I’m setting up lint-staged for a project and everything works as expected when running git from the command line but not when running from sublime merge. (See error below)

It seems like sublime merge is not running git in the same context or something as when doing it in the command line, but I’m a little lost as to how i can proceed with this.

NOTE:
Running windows and powershell for command line, where it works np.


husky > pre-commit (node v10.18.0)
/c/Source/xxxxxx/node_modules/.bin/lint-staged: line 5: cygpath: command not found
internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module ‘C:\lint-staged\bin\lint-staged.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
husky > pre-commit hook failed (add --no-verify to bypass)

0 Likes

#2

For anyone else encountering this issue, the preferences have a git binary setting. it seems to be default “bundled” switching it to “system” fixed the issues.

Preferences -> Advanced -> Git Binary

2 Likes