File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ $reportGenerator = Join-Path $toolsDir $reportGeneratorName
1111function Remove-ArtifactsDir {
1212 if (Test-Path $artifactsDir ) {
1313 write-host - foreground blue " Clean up...`n "
14- rm $artifactsDir - Recurse - Force - ErrorAction Stop
14+ Remove-Item - LiteralPath $artifactsDir - Recurse - Force - ErrorAction Stop
1515 write-host - foreground blue " Clean up...END`n "
1616 }
1717}
@@ -127,14 +127,14 @@ function Compress-ArtifactsAsZip {
127127 $tempZipFile = Join-Path $root $zipFileName
128128 $zipFile = Join-Path $artifactsDir $zipFileName
129129
130- rm $tempZipFile - ErrorAction Ignore
131- rm $zipFile - ErrorAction Ignore
130+ Remove-Item - LiteralPath $tempZipFile - ErrorAction Ignore
131+ Remove-Item - LiteralPath $zipFile - ErrorAction Ignore
132132
133133 # Create zip file
134134 add-type - assembly " system.io.compression.filesystem"
135135 [IO.Compression.ZipFile ]::CreateFromDirectory($artifactsDir , $tempZipFile )
136136
137- mv $tempZipFile $zipFile
137+ Move-Item - LiteralPath $tempZipFile - Destination $zipFile
138138 if (-not $? ) { write-host - foreground red " Failed to move [$tempZipFile ] to [$zipFileName ]." ; exit 1 }
139139
140140 write-host - foreground blue " Zip artifacts...END`n "
You can’t perform that action at this time.
0 commit comments