Skip to content

Commit

Permalink
fix: escape bakfile environment variable (#3329)
Browse files Browse the repository at this point in the history
While using a custom bak file containing special characters (space and
parenthesis), I fall on an exception due to the fact bak path was not
escaped.

This fix apply the same encapsulate than the one done for licence file.
  • Loading branch information
warlof committed Feb 14, 2024
1 parent caf3232 commit b0e2bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ContainerHandling/New-NavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ try {
$restoreBakFolder = $true
if (!$multitenant) {
$bakFile = Join-Path $bakFolder "database.bak"
$parameters += "--env bakfile=$bakFile"
$parameters += "--env bakfile=""$bakFile"""
}
}
}
Expand All @@ -1467,7 +1467,7 @@ try {
if ($bakFile.StartsWith($bcContainerHelperConfig.hostHelperFolder, [StringComparison]::OrdinalIgnoreCase)) {
$bakFile = "$($bcContainerHelperConfig.containerHelperFolder)$($bakFile.Substring($bcContainerHelperConfig.hostHelperFolder.Length))"
}
$parameters += "--env bakfile=$bakFile"
$parameters += "--env bakfile=""$bakFile"""
}

$vsixFile = DetermineVsixFile -vsixFile $vsixFile
Expand Down

0 comments on commit b0e2bbe

Please sign in to comment.