Skip to content

Commit 2d4143e

Browse files
committed
windows/layout.ps1: more robust handling of inputs
We assume the input paths given to the Windows layout.ps1 scripts do not have a trailing slash - we should make sure this is the case before proceeding and doing path-math with that. Signed-off-by: Matthew John Cheetham <[email protected]>
1 parent faaa3b1 commit 2d4143e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/windows/Installer.Windows/layout.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Inputs
22
param ([Parameter(Mandatory)] $Configuration, [Parameter(Mandatory)] $Output, $RuntimeIdentifier, $SymbolOutput)
33

4+
# Trim trailing slashes from output paths
5+
$Output = $Output.TrimEnd('\','/')
6+
$SymbolOutput = $SymbolOutput.TrimEnd('\','/')
7+
48
Write-Output "Output: $Output"
59

610
# Determine a runtime if one was not provided

0 commit comments

Comments
 (0)