|
@ -70,12 +70,8 @@ async function findSpecificGit(path: string): Promise { |
|
|
|
|
|
|
|
|
async function findGitDarwin(): Promise<GitLocation> { |
|
|
async function findGitDarwin(): Promise<GitLocation> { |
|
|
try { |
|
|
try { |
|
|
let path = await run<string>('which', ['git'], 'utf8'); |
|
|
|
|
|
path = path.replace(/^\s+|\s+$/g, ''); |
|
|
|
|
|
|
|
|
|
|
|
if (path !== '/usr/bin/git') { |
|
|
|
|
|
return findSpecificGit(path); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const path = (await run<string>('which', ['git'], 'utf8')).trim(); |
|
|
|
|
|
if (path !== '/usr/bin/git') return findSpecificGit(path); |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
await run<string>('xcode-select', ['-p'], 'utf8'); |
|
|
await run<string>('xcode-select', ['-p'], 'utf8'); |
|
|