Skip to content

Commit

Permalink
Merge pull request #410 from dscho/dont-use-git.exe-from-current-dire…
Browse files Browse the repository at this point in the history
…ctory

Dont use git.exe from current directory
  • Loading branch information
dscho authored Jul 8, 2022
2 parents 2ad870f + 74a9255 commit fe2970d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Octokit} from '@octokit/rest'
import {delimiter} from 'path'

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

/*
* It looks a bit ridiculous to use 56 workers on a build agent that has only
Expand All @@ -24,7 +25,7 @@ async function clone(
): Promise<void> {
if (verbose) core.notice(`Cloning ${url} to ${destination}`)
const child = spawn(
'git.exe',
gitExePath,
[
'clone',
'--depth=1',
Expand Down Expand Up @@ -109,7 +110,7 @@ export async function getViaGit(
if (flavor === 'full') {
core.startGroup(`Checking out ${repo}`)
child = spawn(
'git.exe',
gitExePath,
[`--git-dir=.tmp`, 'worktree', 'add', outputDirectory, head_sha],
{
env: {
Expand Down

0 comments on commit fe2970d

Please sign in to comment.