mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
Replace RegEx with trim()
This commit is contained in:
parent
252abfe90a
commit
76f34266d5
|
@ -84,7 +84,7 @@ function findGitDarwin(onValidate: (path: string) => boolean): Promise<IGit> {
|
||||||
return e('git not found');
|
return e('git not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
const path = gitPathBuffer.toString().replace(/^\s+|\s+$/g, '');
|
const path = gitPathBuffer.toString().trim();
|
||||||
|
|
||||||
function getVersion(path: string) {
|
function getVersion(path: string) {
|
||||||
if (!onValidate(path)) {
|
if (!onValidate(path)) {
|
||||||
|
|
Loading…
Reference in a new issue