mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +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
|
# Pull latest updates only if the repository state is not dirty
|
||||||
Write-Log "Checking if the repository is clean..."
|
Write-Log "Checking if the repository is clean..."
|
||||||
$Status = & "C:\Program Files\Git\cmd\git.exe" status --porcelain
|
$Status = & "git" status --porcelain
|
||||||
if ($Status) {
|
if ($Status) {
|
||||||
Write-Log "Changes in local git repository. Skipping git pull."
|
Write-Log "Changes in local git repository. Skipping git pull."
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Log "Pulling latest updates..."
|
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) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
Write-Log "Failed to pull updates from Git." -Level 'ERROR'
|
Write-Log "Failed to pull updates from Git." -Level 'ERROR'
|
||||||
Exit-Script -exitCode 1
|
Exit-Script -exitCode 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user