fix(commitlint): use process.cwd() as fallback for process.env.PWD to ensure compatibility across platforms
The commitlint module now uses process.cwd() as a fallback when process.env.PWD is not available. This ensures compatibility across different platforms and environments when determining the path to the node_modules directory.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
const nodeModulesPath = path.join(
|
const nodeModulesPath = path.join(
|
||||||
process.env.PWD as string,
|
process.env.PWD || process.cwd(),
|
||||||
'node_modules',
|
'node_modules',
|
||||||
'@commitlint',
|
'@commitlint',
|
||||||
'load'
|
'load'
|
||||||
|
|||||||
Reference in New Issue
Block a user