Skip to content

Commit 8bcacf8

Browse files
steventuxCopilot
andcommitted
Explicitly invoke Python when calling db backup
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 1eee645 commit 8bcacf8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/powershell/maintenance.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ function Invoke-DatabaseBackup {
103103
Set-Item -Path env:DB_PATH -Value "$BaseInstallPath\data\pacs.db"
104104
Set-Item -Path env:TABLE_NAME -Value "stored_instances"
105105
}
106-
.\..\python\database.py
106+
$pythonExe = Join-Path $BaseInstallPath "current\.venv\Scripts\python.exe"
107+
$databaseScript = Join-Path $BaseInstallPath "current\scripts\python\database.py"
108+
& $pythonExe $databaseScript
107109

108110
if ($LASTEXITCODE -ne 0) {
109111
Write-Log "Database backup failed with exit code $LASTEXITCODE" "ERROR"

0 commit comments

Comments
 (0)