Skip to content

Commit 81e3cf6

Browse files
niheavenr15ch13
authored andcommitted
feat(compress): Allow 'Expand-InnoArchive -ExtractDir' to accept '{xxx}' (#3487)
1 parent 51f40e1 commit 81e3cf6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/decompress.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,12 @@ function Expand-InnoArchive {
180180
$Removal
181181
)
182182
$LogPath = "$(Split-Path $Path)\innounp.log"
183-
$ArgList = @('-x', "-d`"$DestinationPath`"", "-c`{app`}\$ExtractDir", "`"$Path`"", '-y')
183+
$ArgList = @('-x', "-d`"$DestinationPath`"", "`"$Path`"", '-y')
184+
switch -Regex ($ExtractDir) {
185+
"^[^{].*" { $ArgList += "-c{app}\$ExtractDir" }
186+
"^{.*" { $ArgList += "-c$ExtractDir" }
187+
Default { $ArgList += "-c{app}" }
188+
}
184189
if ($Switches) {
185190
$ArgList += (-split $Switches)
186191
}

0 commit comments

Comments
 (0)