Skip to content

Commit 077368c

Browse files
committed
Use "location" (full url) only if operationId is not provided.
OperationId is string here, because sometimes it might be empty
1 parent f74c597 commit 077368c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/Public/Utils/Get-FabricLongRunningOperation.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Author: Tiago Balabuch
2929
#>
3030
param (
3131
[Parameter(Mandatory = $false)]
32-
[guid]$operationId,
32+
[string]$operationId,
3333

3434
[Parameter(Mandatory = $false)]
3535
[string]$location,
@@ -42,8 +42,8 @@ Author: Tiago Balabuch
4242
Confirm-TokenState
4343

4444
# Step 1: Construct the API URL
45-
if ($location) {
46-
# Use the Location header to define the operationUrl
45+
if (-not $operationId) {
46+
# Use the Location header to define the operationUrl, if OperationId is not provided
4747
$apiEndpointUrl = $location
4848
} else {
4949
$apiEndpointUrl = "operations/{0}" -f $operationId

0 commit comments

Comments
 (0)