You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the hook is installed in a git submodule the return value of getNodeModulesAbsoluteEntryPoint() is a static path from the time the hook file was generated. This causes problems if you are using containers as part of your dev workflow. Basically the hook fails if you run git from outside the container when the hook was installed from inside the container (and vise-versa).
Doing something like the following should solve the problem:
let_nodeModulesPath=path.resolve(__dirname,'../','../','node_modules')if(!fs.existsSync(_nodeModulesPath)){// We might be in a git submoduleconstprefix=__dirname.split(/[/\\]\.git[/\\]/).shift()constsuffix=__dirname.split(/[/\\]hooks[/\\]/).pop()_nodeModulesPath=path.resolve(path.relative(__dirname,`${prefix}${path.sep}${suffix}`),'node_modules')}
The text was updated successfully, but these errors were encountered:
When the hook is installed in a git submodule the return value of
getNodeModulesAbsoluteEntryPoint()
is a static path from the time the hook file was generated. This causes problems if you are using containers as part of your dev workflow. Basically the hook fails if you run git from outside the container when the hook was installed from inside the container (and vise-versa).Doing something like the following should solve the problem:
The text was updated successfully, but these errors were encountered: