conversionxl / lint-staged-config

CXL lint-staged configuration
0 stars 2 forks source link

fix node env variable INIT_CMD issue on windows #1

Closed saas786 closed 3 years ago

saas786 commented 3 years ago

on windows

process.env.INIT_CWD

throw new ERR_INVALID_ARG_TYPE(name, 'string', value);

when passed to path.join(process.env.INIT_CWD, 'husky.config.js');

so using process.cwd()

as a fallback for windows

slack discussion ref: https://conversionxl.slack.com/archives/C0G52K19U/p1606730153003000

lkraav commented 3 years ago

@saas786 can you amend commit message

"fix: node process.env.INIT_CWD may be missing on Windows"