Skip to content

Commit a11dd93

Browse files
authored
Output a meaningful message if git is not available
Related to nodejs/node#33458
1 parent 506e4e8 commit a11dd93

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cml.js

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ const fixGitSafeDirectory = () => {
103103
.split(/[\r\n]+/)
104104
.includes(directory) || gitConfigSafeDirectory(directory);
105105

106+
// Fail meaningfully if git is not available,
107+
// see https://github.com/nodejs/node/issues/33458
108+
spawnSync('git');
109+
106110
// Fix for git>=2.36.0
107111
addSafeDirectory('*');
108112

0 commit comments

Comments
 (0)