File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
src/Support/Support.Autorest/custom Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ param(
103
103
)
104
104
105
105
process {
106
- $ErrorActionPreference = ' Stop'
107
106
# Write-Output "file path: " + $FilePath
108
107
$FileName = Split-Path $FilePath - Leaf
109
108
Write-Output " file name: " $FileName
@@ -132,7 +131,7 @@ process {
132
131
}
133
132
# Write-Output "Number of chunks: " $NumberOfChunks
134
133
$PSBoundParameters.Remove (' FilePath' ) | Out-Null
135
- New-AzSupportFile - SubscriptionId $SubscriptionId - Name $FileName - WorkspaceName $WorkspaceName - FileSize $FileSize - ChunkSize $ChunkSize - NumberOfChunk $NumberOfChunks @PSBoundParameters
134
+ New-AzSupportFile - ErrorAction Stop - Name $FileName - FileSize $FileSize - ChunkSize $ChunkSize - NumberOfChunk $NumberOfChunks @PSBoundParameters
136
135
137
136
Write-Output " successfully created file"
138
137
$chunkIndex = 0
@@ -147,7 +146,7 @@ process {
147
146
# Write-Output "end index: " + $endIndex
148
147
$FileContent = [convert ]::ToBase64String($FileContentByteArray [$startIndex .. $endIndex ])
149
148
150
- Invoke-AzSupportUploadFile - SubscriptionId $SubscriptionId - FileName $FileName - FileWorkspaceName $WorkspaceName - ChunkIndex $chunkIndex - Content $FileContent @PSBoundParameters
149
+ Invoke-AzSupportUploadFile - ErrorAction Stop - FileName $FileName - ChunkIndex $chunkIndex - Content $FileContent @PSBoundParameters
151
150
$chunkIndex ++
152
151
$startIndex = $endIndex + 1
153
152
$endIndex = $FileSize - 1
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ process {
123
123
Write-Output " Number of chunks: " $NumberOfChunks
124
124
125
125
$PSBoundParameters.Remove (' FilePath' ) | Out-Null
126
- New-AzSupportFilesNoSubscription - Name $FileName - WorkspaceName $WorkspaceName - FileSize $FileSize - ChunkSize $ChunkSize - NumberOfChunk $NumberOfChunks @PSBoundParameters
126
+ New-AzSupportFilesNoSubscription - ErrorAction Stop - Name $FileName - FileSize $FileSize - ChunkSize $ChunkSize - NumberOfChunk $NumberOfChunks @PSBoundParameters
127
127
128
128
Write-Output " successfully created file"
129
129
$chunkIndex = 0
@@ -138,7 +138,7 @@ process {
138
138
Write-Output " end index: " + $endIndex
139
139
$FileContent = [convert ]::ToBase64String($FileContentByteArray [$startIndex .. $endIndex ])
140
140
141
- Invoke-AzSupportUploadFilesNoSubscription - FileName $FileName - FileWorkspaceName $WorkspaceName - ChunkIndex $chunkIndex - Content $FileContent @PSBoundParameters
141
+ Invoke-AzSupportUploadFilesNoSubscription - ErrorAction Stop - FileName $FileName - ChunkIndex $chunkIndex - Content $FileContent @PSBoundParameters
142
142
$chunkIndex ++
143
143
$startIndex = $endIndex + 1
144
144
$endIndex = $FileSize - 1
You can’t perform that action at this time.
0 commit comments