Skip to content

Commit 84447a4

Browse files
Avoid clobbering 'command' so that it can be referred to later
1 parent b6eb0ba commit 84447a4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,20 +1809,20 @@ ClassMethod RunGitCommandWithInput(command As %String, inFile As %String = "", O
18091809
set outLog = ##class(%Library.File).TempFilename()
18101810
set errLog = ##class(%Library.File).TempFilename()
18111811

1812-
set command = $extract(..GitBinPath(),2,*-1)
1812+
set gitCommand = $extract(..GitBinPath(),2,*-1)
18131813

18141814
set baseArgs = "/STDOUT="_$$$QUOTE(outLog)_" /STDERR="_$$$QUOTE(errLog)_$case(inFile, "":"", :" /STDIN="_$$$QUOTE(inFile))
18151815
try {
18161816
// Inject instance manager directory as global git config home directory
18171817
// On Linux, this avoids trying to use /root/.config/git/attributes for global git config
18181818
set env("XDG_CONFIG_HOME") = ##class(%File).ManagerDirectory()
1819-
set returnCode = $zf(-100,"/ENV=env... "_baseArgs,command,newArgs...)
1819+
set returnCode = $zf(-100,"/ENV=env... "_baseArgs,gitCommand,newArgs...)
18201820
} catch e {
18211821
if $$$isWINDOWS {
1822-
set returnCode = $zf(-100,baseArgs,command,newArgs...)
1822+
set returnCode = $zf(-100,baseArgs,gitCommand,newArgs...)
18231823
} else {
18241824
// If can't inject XDG_CONFIG_HOME (older IRIS version), need /SHELL on Linux to avoid permissions errors trying to use root's config
1825-
set returnCode = $zf(-100,"/SHELL "_baseArgs,command,newArgs...)
1825+
set returnCode = $zf(-100,"/SHELL "_baseArgs,gitCommand,newArgs...)
18261826
}
18271827
}
18281828

0 commit comments

Comments
 (0)