File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -146,8 +146,13 @@ extends:
146146 inputs :
147147 targetType : inline
148148 script : |
149- $null = New-Item -ItemType Directory -Path "$(Pipeline.Workspace)\release"
150- Copy-Item "$(Pipeline.Workspace)\Microsoft.PowerShell.*.nupkg" -Destination "$(Pipeline.Workspace)\release" -Recurse -Force -Verbose
149+ $DestPath = New-Item -ItemType Directory -Path "$(Pipeline.Workspace)\release"
150+ $nupkgFile = Get-ChildItem "$(Pipeline.Workspace)\Microsoft.PowerShell.Native.*.nupkg" -Recurse
151+ if (-not $nupkgFile) {
152+ throw "No nupkg files found in '$(Pipeline.Workspace)'"
153+ }
154+
155+ Copy-Item $nupkgFile -Destination $DestPath -Recurse -Force -Verbose
151156 Write-Verbose -Verbose "The .nupkgs below will be pushed:"
152157 Get-ChildItem "$(Pipeline.Workspace)/release" -recurse
153158 displayName : Download and capture nupkgs
You can’t perform that action at this time.
0 commit comments