Skip to content

Commit 40ec1d0

Browse files
committed
Fix bug in file handing when input is a script file
1 parent 4922f91 commit 40ec1d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/PSAppDeployToolkit.Tools/Public/Convert-ADTDeployment.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ function Convert-ADTDeployment
175175
# Create a temp copy of the script to run ScriptAnalyzer fixes on - prefix filename with _ if it's named Invoke-AppDeployToolkit.ps1
176176
$inputScriptPath = if ($Path -match '(?<=^|\\)Invoke-AppDeployToolkit.ps1$')
177177
{
178-
[System.IO.Path]::Combine(([System.IO.Path]::GetDirectoryName($Path)), "_$([System.IO.Path]::GetFileName($Path))")
178+
[System.IO.Path]::Combine($tempFolderPath, "_$([System.IO.Path]::GetFileName($Path))")
179179
}
180180
else
181181
{
182-
$Path
182+
[System.IO.Path]::Combine($tempFolderPath, [System.IO.Path]::GetFileName($Path))
183183
}
184184

185185
Write-Verbose -Message "Creating copy of [$Path] as [$inputScriptPath]"

0 commit comments

Comments
 (0)