mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 01:21:11 +00:00
Don't take assumptions about the install location of git
This commit is contained in:
parent
a306f5a245
commit
86e50b1764
|
@ -203,13 +203,13 @@ function Main {
|
|||
|
||||
# Pull latest updates only if the repository state is not dirty
|
||||
Write-Log "Checking if the repository is clean..."
|
||||
$Status = & "C:\Program Files\Git\cmd\git.exe" status --porcelain
|
||||
$Status = & "git" status --porcelain
|
||||
if ($Status) {
|
||||
Write-Log "Changes in local git repository. Skipping git pull."
|
||||
}
|
||||
else {
|
||||
Write-Log "Pulling latest updates..."
|
||||
& "C:\Program Files\Git\cmd\git.exe" pull 2>&1 | Out-File $LogFilePath -Append
|
||||
& "git" pull 2>&1 | Out-File $LogFilePath -Append
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Log "Failed to pull updates from Git." -Level 'ERROR'
|
||||
Exit-Script -exitCode 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user