Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7589061

Browse filesBrowse files
committed
fix: fix addition of git to PATH on Windows
1 parent a716227 commit 7589061
Copy full SHA for 7589061

File tree

5 files changed

+8
-7
lines changed
Filter options

5 files changed

+8
-7
lines changed

‎dist/legacy/setup-cpp.js

Copy file name to clipboardExpand all lines: dist/legacy/setup-cpp.js
+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/legacy/setup-cpp.js.map

Copy file name to clipboardExpand all lines: dist/legacy/setup-cpp.js.map
+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/modern/setup-cpp.mjs

Copy file name to clipboardExpand all lines: dist/modern/setup-cpp.mjs
+1-1
Large diffs are not rendered by default.

‎dist/modern/setup-cpp.mjs.map

Copy file name to clipboardExpand all lines: dist/modern/setup-cpp.mjs.map
+1-1
Large diffs are not rendered by default.

‎src/git/git.ts

Copy file name to clipboardExpand all lines: src/git/git.ts
+4-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { isUbuntu } from "../utils/env/isUbuntu.js"
1212
import { setupChocoPack } from "../utils/setup/setupChocoPack.js"
1313
import { setupDnfPack } from "../utils/setup/setupDnfPack.js"
1414
import { setupPacmanPack } from "../utils/setup/setupPacmanPack.js"
15+
import { join } from "path"
1516

1617
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1718
export async function setupGit(version: string, _setupDir: string, _arch: string) {
@@ -53,11 +54,11 @@ export async function setupGit(version: string, _setupDir: string, _arch: string
5354

5455
function findWindowsGit() {
5556
const candidates = [
56-
"C:/Program Files/Git/bin/git.exe",
57-
"C:/Program Files (x86)/Git/bin/git.exe",
57+
"C:/Program Files/Git/bin/",
58+
"C:/Program Files (x86)/Git/bin/",
5859
]
5960
for (const candidate of candidates) {
60-
if (existsSync(candidate)) {
61+
if (existsSync(join(candidate, "git.exe"))) {
6162
return candidate
6263
}
6364
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.