Skip to content

Commit 7e23a82

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 9df8ec2 commit 7e23a82

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
@@ -104,7 +104,9 @@ function Invoke-DatabaseBackup {
104104
Set-Item -Path env:DB_PATH -Value "$BaseInstallPath\data\pacs.db"
105105
Set-Item -Path env:TABLE_NAME -Value "stored_instances"
106106
}
107-
.\..\python\database.py
107+
$pythonExe = Join-Path $BaseInstallPath "current\.venv\Scripts\python.exe"
108+
$databaseScript = Join-Path $BaseInstallPath "current\scripts\python\database.py"
109+
& $pythonExe $databaseScript
108110

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

0 commit comments

Comments
 (0)