We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3289574 commit c4b2addCopy full SHA for c4b2add
1 file changed
lib/git-hooks.js
@@ -176,7 +176,11 @@ function getClosestGitPath(currentPath) {
176
var result = execSync('git rev-parse --git-dir', {cwd: currentPath}).toString();
177
return result.replace(/\n/g, '');
178
} catch (error) {
179
- // No git dir?
180
- return undefined;
+ if (error.status === 128) {
+ // No git dir?
181
+ return undefined;
182
+ }
183
+ // Throw any other errors
184
+ throw error;
185
}
186
0 commit comments