Replace RegEx with trim()

This commit is contained in:
Ladislau Szomoru 2022-01-04 11:34:42 +01:00
parent 252abfe90a
commit 76f34266d5
No known key found for this signature in database
GPG key ID: 2B88287CB9DB080B

View file

@ -84,7 +84,7 @@ function findGitDarwin(onValidate: (path: string) => boolean): Promise<IGit> {
return e('git not found');
}
const path = gitPathBuffer.toString().replace(/^\s+|\s+$/g, '');
const path = gitPathBuffer.toString().trim();
function getVersion(path: string) {
if (!onValidate(path)) {