From 1914620e49fd19b5d21492d2e8eccf777863d90b Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 28 May 2024 15:45:38 +0200 Subject: [PATCH 01/13] Add test to verify GCM has been bundled correctly --- test/fast/gcm-test.ts | 13 +++++++++++++ test/helpers.ts | 1 + 2 files changed, 14 insertions(+) create mode 100644 test/fast/gcm-test.ts diff --git a/test/fast/gcm-test.ts b/test/fast/gcm-test.ts new file mode 100644 index 00000000..18a6d9ea --- /dev/null +++ b/test/fast/gcm-test.ts @@ -0,0 +1,13 @@ +import { GitProcess } from '../../lib' +import { gitCredentialManagerVersion } from '../helpers' + +describe('git-credential-manager', () => { + it('matches the expected version', async () => { + const result = await GitProcess.exec( + ['credential-manager', '--version'], + process.cwd() + ) + expect(result.exitCode).toBe(0) + expect(result.stdout).toContain(`git-lfs/${gitCredentialManagerVersion} `) + }) +}) diff --git a/test/helpers.ts b/test/helpers.ts index a29620c2..5eda0990 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -4,6 +4,7 @@ import { GitProcess, IGitResult, GitError } from '../lib' export const gitVersion = '2.43.4' export const gitForWindowsVersion = '2.43.4.windows.1' export const gitLfsVersion = '3.5.1' +export const gitCredentialManagerVersion = '2.5.0' const temp = require('temp').track() From 098cd47a686d74e941f3b6327a6d7520dd2aa4c5 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 28 May 2024 15:51:02 +0200 Subject: [PATCH 02/13] Bump dugite-native --- script/embedded-git.json | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/script/embedded-git.json b/script/embedded-git.json index 9c30ad26..40ec2578 100644 --- a/script/embedded-git.json +++ b/script/embedded-git.json @@ -1,42 +1,42 @@ { "win32-x64": { - "name": "dugite-native-v2.43.4-1074931-windows-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-windows-x64.tar.gz", - "checksum": "a1ce9ad3243a44b7b4b86056bfbc2238514faaaa8fad5da12d4483491347aace" + "name": "dugite-native-v2.43.4-17466a1-windows-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-windows-x64.tar.gz", + "checksum": "0d088f671ca9515c579b66576dca96a8b5b613dfde229d352ba88af1a71d2746" }, "win32-ia32": { - "name": "dugite-native-v2.43.4-1074931-windows-x86.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-windows-x86.tar.gz", - "checksum": "6edd41d81bee1ad11dfa9db84bce74afafa59edd27fcd8cf836b761193a30a59" + "name": "dugite-native-v2.43.4-17466a1-windows-x86.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-windows-x86.tar.gz", + "checksum": "e3e1a48e5f82f2eeb16e5b9c36091c6bc002c8d42ed0729c9a0b3fcd9ddd5685" }, "darwin-x64": { - "name": "dugite-native-v2.43.4-1074931-macOS-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-macOS-x64.tar.gz", - "checksum": "a7e2e4009ad119869792131b54475d3691b11a9ca2e66222be8232a9f7e323ab" + "name": "dugite-native-v2.43.4-17466a1-macOS-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-macOS-x64.tar.gz", + "checksum": "3811a43962a01ba049fd9e092ec009f3097228fe81dd7f84ce6f3aa42fc458c6" }, "darwin-arm64": { - "name": "dugite-native-v2.43.4-1074931-macOS-arm64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-macOS-arm64.tar.gz", - "checksum": "bc385fa42d5b01513b5c9da6ee04a4868f30b60a42bd144b5ab8b993780aef7f" + "name": "dugite-native-v2.43.4-17466a1-macOS-arm64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-macOS-arm64.tar.gz", + "checksum": "5732de335c9c8a00d302d148ccd295711d4928a0bdd65ab4cae3afcd18301ea0" }, "linux-x64": { - "name": "dugite-native-v2.43.4-1074931-ubuntu-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-ubuntu-x64.tar.gz", - "checksum": "fbff97763ca9cedbf87a196015f4dbffaa102681fd25103f99c40a7d561b8338" + "name": "dugite-native-v2.43.4-17466a1-ubuntu-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-x64.tar.gz", + "checksum": "05401954be3c48b9dcd888940bc5029b190cd58d50dff2968128ba7fcace385d" }, "linux-ia32": { - "name": "dugite-native-v2.43.4-1074931-ubuntu-x86.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-ubuntu-x86.tar.gz", - "checksum": "458e00694dbc94a691e25c67546d93c5df58877c805d300a1d6c8ad440c56aaf" + "name": "dugite-native-v2.43.4-17466a1-ubuntu-x86.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-x86.tar.gz", + "checksum": "9a283c6eb83e04c2421f57671437b5eda210df615786e4a8296abf49e7426f02" }, "linux-arm": { - "name": "dugite-native-v2.43.4-1074931-ubuntu-arm.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-ubuntu-arm.tar.gz", - "checksum": "03e25333ce52cccf32e6b4335978f4cd53ada2ad06dd3b424132edd9f5668357" + "name": "dugite-native-v2.43.4-17466a1-ubuntu-arm.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-arm.tar.gz", + "checksum": "e46520db74093047ec62e969f0d92c93aa9b8239a124f5b01a2d6d9af171e589" }, "linux-arm64": { - "name": "dugite-native-v2.43.4-1074931-ubuntu-arm64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-1/dugite-native-v2.43.4-1074931-ubuntu-arm64.tar.gz", - "checksum": "1d71732200951803dd55d2b943b322d0cfab8c36a9ecd859d08f840daf95a270" + "name": "dugite-native-v2.43.4-17466a1-ubuntu-arm64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-arm64.tar.gz", + "checksum": "2f02a07ae4f9458613bf110a34d50dbf8f853a2a1e0256b32ca00124a4fc8ca5" } } \ No newline at end of file From 01994993d72a08dc05be52c927bb68bdf3fcb6da Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Tue, 28 May 2024 15:54:36 +0200 Subject: [PATCH 03/13] Copy pasta mistake --- test/fast/gcm-test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fast/gcm-test.ts b/test/fast/gcm-test.ts index 18a6d9ea..5b300519 100644 --- a/test/fast/gcm-test.ts +++ b/test/fast/gcm-test.ts @@ -8,6 +8,6 @@ describe('git-credential-manager', () => { process.cwd() ) expect(result.exitCode).toBe(0) - expect(result.stdout).toContain(`git-lfs/${gitCredentialManagerVersion} `) + expect(result.stdout).toContain(gitCredentialManagerVersion) }) }) From ad2bcec191c54c002e0fc52859c517ed45134482 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 29 May 2024 09:26:17 +0200 Subject: [PATCH 04/13] Bump dugite to 2.45.1 --- script/embedded-git.json | 48 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/script/embedded-git.json b/script/embedded-git.json index 40ec2578..8b0b2fda 100644 --- a/script/embedded-git.json +++ b/script/embedded-git.json @@ -1,42 +1,42 @@ { "win32-x64": { - "name": "dugite-native-v2.43.4-17466a1-windows-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-windows-x64.tar.gz", - "checksum": "0d088f671ca9515c579b66576dca96a8b5b613dfde229d352ba88af1a71d2746" + "name": "dugite-native-v2.45.1-e87d290-windows-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-windows-x64.tar.gz", + "checksum": "6a79708447291d8b95db9f523f949389d63fca1a25b72520d1a0b9a8d7ede3e1" }, "win32-ia32": { - "name": "dugite-native-v2.43.4-17466a1-windows-x86.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-windows-x86.tar.gz", - "checksum": "e3e1a48e5f82f2eeb16e5b9c36091c6bc002c8d42ed0729c9a0b3fcd9ddd5685" + "name": "dugite-native-v2.45.1-e87d290-windows-x86.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-windows-x86.tar.gz", + "checksum": "99dafc60fdeb646988c7d6f54c74a557f877b28624ed82e4201460b7d2394d49" }, "darwin-x64": { - "name": "dugite-native-v2.43.4-17466a1-macOS-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-macOS-x64.tar.gz", - "checksum": "3811a43962a01ba049fd9e092ec009f3097228fe81dd7f84ce6f3aa42fc458c6" + "name": "dugite-native-v2.45.1-e87d290-macOS-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-macOS-x64.tar.gz", + "checksum": "2a3c0b52e98a8423fe54722dd4dce905fce2d1d3014452e26df01f84c5033c3f" }, "darwin-arm64": { - "name": "dugite-native-v2.43.4-17466a1-macOS-arm64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-macOS-arm64.tar.gz", - "checksum": "5732de335c9c8a00d302d148ccd295711d4928a0bdd65ab4cae3afcd18301ea0" + "name": "dugite-native-v2.45.1-e87d290-macOS-arm64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-macOS-arm64.tar.gz", + "checksum": "453ea5c74da5bb75b0474b19e0269feb548eaf2d2449b3e74a84123ced415e4c" }, "linux-x64": { - "name": "dugite-native-v2.43.4-17466a1-ubuntu-x64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-x64.tar.gz", - "checksum": "05401954be3c48b9dcd888940bc5029b190cd58d50dff2968128ba7fcace385d" + "name": "dugite-native-v2.45.1-e87d290-ubuntu-x64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-x64.tar.gz", + "checksum": "cdf8c4cdca273e015d95c15fcc99e2322a97316f77f0b958b6b86424ca2b12da" }, "linux-ia32": { - "name": "dugite-native-v2.43.4-17466a1-ubuntu-x86.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-x86.tar.gz", - "checksum": "9a283c6eb83e04c2421f57671437b5eda210df615786e4a8296abf49e7426f02" + "name": "dugite-native-v2.45.1-e87d290-ubuntu-x86.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-x86.tar.gz", + "checksum": "8ef716da12f5c2ca03288a5ee10e6cdd5ad958a164b379a6aafa19ca7f4eb72c" }, "linux-arm": { - "name": "dugite-native-v2.43.4-17466a1-ubuntu-arm.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-arm.tar.gz", - "checksum": "e46520db74093047ec62e969f0d92c93aa9b8239a124f5b01a2d6d9af171e589" + "name": "dugite-native-v2.45.1-e87d290-ubuntu-arm.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-arm.tar.gz", + "checksum": "5b8d27f9eba833477f518377ba5339c690523cc218fb3b3189fa8cacb229493f" }, "linux-arm64": { - "name": "dugite-native-v2.43.4-17466a1-ubuntu-arm64.tar.gz", - "url": "https://github.com/desktop/dugite-native/releases/download/v2.43.4-2/dugite-native-v2.43.4-17466a1-ubuntu-arm64.tar.gz", - "checksum": "2f02a07ae4f9458613bf110a34d50dbf8f853a2a1e0256b32ca00124a4fc8ca5" + "name": "dugite-native-v2.45.1-e87d290-ubuntu-arm64.tar.gz", + "url": "https://github.com/desktop/dugite-native/releases/download/v2.45.1/dugite-native-v2.45.1-e87d290-ubuntu-arm64.tar.gz", + "checksum": "21cec4d32ceec81efa146a40253a2f766a1d3b34a6e7c1fed1d87c7c553b3c99" } } \ No newline at end of file From 146b3f03ee9e3421b7dbda759eab8fb7ca5e0016 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 29 May 2024 09:48:41 +0200 Subject: [PATCH 05/13] Update git versions --- test/helpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/helpers.ts b/test/helpers.ts index 5eda0990..87a7807f 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -1,8 +1,8 @@ import { GitProcess, IGitResult, GitError } from '../lib' // NOTE: bump these versions to the latest stable releases -export const gitVersion = '2.43.4' -export const gitForWindowsVersion = '2.43.4.windows.1' +export const gitVersion = '2.45.1' +export const gitForWindowsVersion = '2.45.1.windows.1' export const gitLfsVersion = '3.5.1' export const gitCredentialManagerVersion = '2.5.0' From bde5f3d8214eb1e8613c67c68c45df7b5b1fbdd0 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 29 May 2024 10:10:39 +0200 Subject: [PATCH 06/13] 3.0.0-rc1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a291a177..0f4d050f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dugite", - "version": "3.0.0-rc0", + "version": "3.0.0-rc1", "description": "Elegant bindings for Git", "main": "./build/lib/index.js", "typings": "./build/lib/index.d.ts", From c974bb1b0e4e8379cea505d9dc362f7ef35b5eaa Mon Sep 17 00:00:00 2001 From: tidy-dev <75402236+tidy-dev@users.noreply.github.com> Date: Tue, 4 Jun 2024 18:34:59 -0400 Subject: [PATCH 07/13] Make sure we are copying the path variable --- lib/git-environment.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index c7a82983..fdadf8ab 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -83,6 +83,7 @@ export function setupEnvironment( } { const env: Record = { ...process.env, + ...{ PATH: process.env.PATH || '' }, // Ensure PATH is always set not process.env.Path like can be on case-insensitive Windows ...environmentVariables, } From 812a371a27ea4014622758ad5a689974cd9d0e99 Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Wed, 5 Jun 2024 08:42:30 +0200 Subject: [PATCH 08/13] Add test for PATH --- test/fast/environment-test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/fast/environment-test.ts b/test/fast/environment-test.ts index 06131485..fdb2f084 100644 --- a/test/fast/environment-test.ts +++ b/test/fast/environment-test.ts @@ -36,4 +36,9 @@ describe('environment variables', () => { delete process.env.GIT_EXEC_PATH } }) + + it('resulting PATH contains the original PATH', async () => { + const { env } = await setupEnvironment({}) + expect((env)['PATH']).toContain(process.env.PATH) + }) }) From f5cf7f2295d80e046aa984ca83230201d2b91dfb Mon Sep 17 00:00:00 2001 From: Sergio Padrino Date: Wed, 5 Jun 2024 08:47:13 +0200 Subject: [PATCH 09/13] =?UTF-8?q?Explain=20the=20test=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/fast/environment-test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/fast/environment-test.ts b/test/fast/environment-test.ts index fdb2f084..a0eb12b1 100644 --- a/test/fast/environment-test.ts +++ b/test/fast/environment-test.ts @@ -38,6 +38,9 @@ describe('environment variables', () => { }) it('resulting PATH contains the original PATH', async () => { + // This test will ensure that on platforms where env vars names are + // case-insensitive (like Windows) we don't end up with an invalid PATH + // and the original one lost in the process. const { env } = await setupEnvironment({}) expect((env)['PATH']).toContain(process.env.PATH) }) From 5cd7d8ffa510036f5ec34b138118a6b06a8835b5 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 5 Jun 2024 12:54:43 +0200 Subject: [PATCH 10/13] Make test fail on environments that don't have Path set --- test/fast/environment-test.ts | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/test/fast/environment-test.ts b/test/fast/environment-test.ts index a0eb12b1..6ceeb419 100644 --- a/test/fast/environment-test.ts +++ b/test/fast/environment-test.ts @@ -37,11 +37,27 @@ describe('environment variables', () => { } }) - it('resulting PATH contains the original PATH', async () => { - // This test will ensure that on platforms where env vars names are - // case-insensitive (like Windows) we don't end up with an invalid PATH - // and the original one lost in the process. - const { env } = await setupEnvironment({}) - expect((env)['PATH']).toContain(process.env.PATH) - }) + if (process.platform === 'win32') { + it('resulting PATH contains the original PATH', () => { + const originalPathKey = Object.keys(process.env).find( + k => k.toUpperCase() === 'PATH' + ) + expect(originalPathKey).not.toBeUndefined() + + const originalPathValue = process.env.PATH + + try { + delete process.env.PATH + process.env.Path = 'wow-such-case-insensitivity' + // This test will ensure that on platforms where env vars names are + // case-insensitive (like Windows) we don't end up with an invalid PATH + // and the original one lost in the process. + const { env } = setupEnvironment({}) + expect(env.PATH).toContain('wow-such-case-insensitivity') + } finally { + delete process.env.Path + process.env[originalPathKey!] = originalPathValue + } + }) + } }) From b813449da53a644eb9cb17a0d07812178ad1d72b Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 5 Jun 2024 12:55:01 +0200 Subject: [PATCH 11/13] This is just good form, don't interpolate to 'undefined' --- lib/git-environment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index fdadf8ab..925d4fad 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -92,7 +92,7 @@ export function setupEnvironment( if (process.platform === 'win32') { const mingw = process.arch === 'x64' ? 'mingw64' : 'mingw32' - env.PATH = `${gitDir}\\${mingw}\\bin;${gitDir}\\${mingw}\\usr\\bin;${env.PATH}` + env.PATH = `${gitDir}\\${mingw}\\bin;${gitDir}\\${mingw}\\usr\\bin;${env.PATH ?? ''}` } env.GIT_EXEC_PATH = resolveGitExecPath(env) From 128440e1cd1d7a680b95166e9e8dbc486587789e Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 5 Jun 2024 12:55:35 +0200 Subject: [PATCH 12/13] Ensure we only have one PATH env var --- lib/git-environment.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index 925d4fad..d718412c 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -81,9 +81,17 @@ export function setupEnvironment( env: Record gitLocation: string } { + // This will get Path, pATh, PATH et all on Windows + const PATH = process.env.PATH + const env: Record = { - ...process.env, - ...{ PATH: process.env.PATH || '' }, // Ensure PATH is always set not process.env.Path like can be on case-insensitive Windows + // Merge all of process.env except Path, PATH, et all, we'll add that in just a sec + ...Object.fromEntries( + Object.entries(process.env).filter(([k]) => k.toUpperCase() !== 'PATH') + ), + // Ensure PATH is always set in upper case not process.env.Path like can + // be on case-insensitive Windows + ...(PATH ? { PATH } : {}), ...environmentVariables, } @@ -97,17 +105,6 @@ export function setupEnvironment( env.GIT_EXEC_PATH = resolveGitExecPath(env) - if (process.platform === 'win32') { - // while reading the environment variable is case-insensitive - // you can create a hash with multiple values, which means the - // wrong value might be used when spawning the child process - // - // this ensures we only ever supply one value for PATH - if (env.Path) { - delete env.Path - } - } - // On Windows the contained Git environment (minGit) ships with a system level // gitconfig that we can control but on macOS and Linux /etc/gitconfig is used // as the system-wide configuration file and we're unable to modify it. From 2918582f45501177d841a7f7301d3337a1ac6234 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 5 Jun 2024 13:04:24 +0200 Subject: [PATCH 13/13] Liiint --- lib/git-environment.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/git-environment.ts b/lib/git-environment.ts index d718412c..9615758e 100644 --- a/lib/git-environment.ts +++ b/lib/git-environment.ts @@ -100,7 +100,9 @@ export function setupEnvironment( if (process.platform === 'win32') { const mingw = process.arch === 'x64' ? 'mingw64' : 'mingw32' - env.PATH = `${gitDir}\\${mingw}\\bin;${gitDir}\\${mingw}\\usr\\bin;${env.PATH ?? ''}` + env.PATH = `${gitDir}\\${mingw}\\bin;${gitDir}\\${mingw}\\usr\\bin;${ + env.PATH ?? '' + }` } env.GIT_EXEC_PATH = resolveGitExecPath(env)