Skip to content

Commit c8511bc

Browse files
committed
stage all api bug fix to ignore git line feed warnings from being considered as error
1 parent 92e250e commit c8511bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

git/gitStageAllItemsAPI.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@ const gitStageAllItemsApi = async (repoId) => {
1717
.then(({ stdout, stderr }) => {
1818
if (!stderr) {
1919
return "ALL_STAGED";
20+
} else if (stderr.match(/warning: LF will be replaced by CRLF/gi)) {
21+
console.log("WARN:", stderr);
22+
return "ALL_STAGED";
2023
} else {
21-
console.log(stderr);
24+
console.log("ERROR:", stderr);
2225
return "ERR_STAGE_ALL";
2326
}
2427
})
2528
.catch((err) => {
29+
console.log("ERROR:", err);
2630
return "ERR_STAGE_ALL";
2731
});
2832
};

0 commit comments

Comments
 (0)