Skip to content

Commit fe2970d

Browse files
authored
Merge pull request #410 from dscho/dont-use-git.exe-from-current-directory
Dont use git.exe from current directory
2 parents 2ad870f + 74a9255 commit fe2970d

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

dist/index.js

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/git.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {Octokit} from '@octokit/rest'
44
import {delimiter} from 'path'
55

66
const gitForWindowsUsrBinPath = 'C:/Program Files/Git/usr/bin'
7+
const gitExePath = 'C:/Program Files/Git/cmd/git.exe'
78

89
/*
910
* It looks a bit ridiculous to use 56 workers on a build agent that has only
@@ -24,7 +25,7 @@ async function clone(
2425
): Promise<void> {
2526
if (verbose) core.notice(`Cloning ${url} to ${destination}`)
2627
const child = spawn(
27-
'git.exe',
28+
gitExePath,
2829
[
2930
'clone',
3031
'--depth=1',
@@ -109,7 +110,7 @@ export async function getViaGit(
109110
if (flavor === 'full') {
110111
core.startGroup(`Checking out ${repo}`)
111112
child = spawn(
112-
'git.exe',
113+
gitExePath,
113114
[`--git-dir=.tmp`, 'worktree', 'add', outputDirectory, head_sha],
114115
{
115116
env: {

0 commit comments

Comments
 (0)