diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index 53debad343e1..565803213096 100644 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -124,7 +124,12 @@ if (![string]::IsNullOrWhiteSpace($ServiceDirectory)) { $preRemovalScript = Join-Path -Path $root -ChildPath 'remove-test-resources-pre.ps1' if (Test-Path $preRemovalScript) { Log "Invoking pre resource removal script '$preRemovalScript'" - &$preRemovalScript -ResourceGroupName $ResourceGroupName @PSBoundParameters + + if ($PSCmdlet.ParameterSetName.StartsWith('ResourceGroup')) { + $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName); + } + + &$preRemovalScript @PSBoundParameters } } diff --git a/eng/common/scripts/Submit-PullRequest.ps1 b/eng/common/scripts/Submit-PullRequest.ps1 index 145e69b7f17c..2313a83c9f9a 100644 --- a/eng/common/scripts/Submit-PullRequest.ps1 +++ b/eng/common/scripts/Submit-PullRequest.ps1 @@ -41,7 +41,7 @@ param( $PRBody = $PRTitle ) -Write-Host $MyInvocation.Line +Write-Host "> $PSCommandPath $args" $query = "state=open&head=${PROwner}:${PRBranch}&base=${BaseBranch}" diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1 index 58c6d3654019..3d097abab8b2 100644 --- a/eng/common/scripts/copy-docs-to-blobstorage.ps1 +++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1 @@ -10,7 +10,7 @@ param ( $UploadLatest=1 ) -Write-Host $MyInvocation.Line +Write-Host "> $PSCommandPath $args" $Language = $Language.ToLower() diff --git a/eng/common/scripts/copy-readmes-to-docs.ps1 b/eng/common/scripts/copy-readmes-to-docs.ps1 index 285eefce5a18..837e52f36607 100644 --- a/eng/common/scripts/copy-readmes-to-docs.ps1 +++ b/eng/common/scripts/copy-readmes-to-docs.ps1 @@ -9,7 +9,9 @@ param ( [String]$TargetServices ) -$PACKAGE_README_REGEX = ".*[\/\\]sdk[\\\/][^\/\\]+[\\\/][^\/\\]+[\/\\]README\.md" +Write-Host "> $PSCommandPath $args" + +$PACKAGE_README_REGEX = ".*[\/\\]sdk[\\\/][^\/\\]+[\\\/][^\/\\]+[\/\\]README\.md" Write-Host "repo is $CodeRepo" @@ -52,10 +54,10 @@ else { foreach($service in $selectedServices){ $readmePath = Join-Path -Path $CodeRepo -ChildPath "sdk/$service" - Write-Host "Examining: $readmePath" + Write-Host "Examining: $readmePath" $libraries = $metadataResponse | Where-Object { $_.RepoPath -eq $service } - + foreach($library in $libraries){ $package = $library.Package diff --git a/eng/common/scripts/create-tags-and-git-release.ps1 b/eng/common/scripts/create-tags-and-git-release.ps1 index 50cdbe00364d..f2f4c77384c3 100644 --- a/eng/common/scripts/create-tags-and-git-release.ps1 +++ b/eng/common/scripts/create-tags-and-git-release.ps1 @@ -18,7 +18,7 @@ param ( [switch]$forceCreate = $false ) -Write-Host $MyInvocation.Line +Write-Host "> $PSCommandPath $args" $VERSION_REGEX = "(?\d+)(\.(?\d+))?(\.(?\d+))?((?
[^0-9][^\s]+))?"
 $SDIST_PACKAGE_REGEX = "^(?.*)\-(?$VERSION_REGEX$)"
diff --git a/eng/common/scripts/git-branch-push.ps1 b/eng/common/scripts/git-branch-push.ps1
index 8be1cd1f30b2..4f2b5d771373 100644
--- a/eng/common/scripts/git-branch-push.ps1
+++ b/eng/common/scripts/git-branch-push.ps1
@@ -28,7 +28,7 @@ param(
     [string] $PushArgs = ""
 )
 
-Write-Host $MyInvocation.Line
+Write-Host "> $PSCommandPath $args"
 
 # This is necessay because of the janky git command output writing to stderr.
 # Without explicitly setting the ErrorActionPreference to continue the script