From de3554d869b891b5c3c1939de16576305eec804c Mon Sep 17 00:00:00 2001 From: Georgi Matev Date: Mon, 10 Apr 2023 19:19:27 -0700 Subject: [PATCH] Quick ci fix (#3084) The defensive flattening of the inputs was at the wrong place. --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [ ] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [x] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * # #### Test Plan - [x] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/cmd/purge/scripts/onedrivePurge.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd/purge/scripts/onedrivePurge.ps1 b/src/cmd/purge/scripts/onedrivePurge.ps1 index dbb31c1e8..1a587d25a 100644 --- a/src/cmd/purge/scripts/onedrivePurge.ps1 +++ b/src/cmd/purge/scripts/onedrivePurge.ps1 @@ -112,10 +112,6 @@ function Purge-Library { ######## MAIN ######### -# ensure that there are no unexpanded entries in the list of parameters -$LibraryNameList = $LibraryNameList | ForEach-Object { @($_.Split(',').Trim()) } -$FolderPrefixPurgeList = $FolderPrefixPurgeList | ForEach-Object { @($_.Split(',').Trim()) } - # Setup SharePointPnP if (-not (Get-Module -ListAvailable -Name PnP.PowerShell)) { $ProgressPreference = 'SilentlyContinue' @@ -173,6 +169,10 @@ Write-Host "`nAuthenticating and connecting to $SiteUrl" Connect-PnPOnline -Url $siteUrl -Credential $cred Write-Host "Connected to $siteUrl`n" +# ensure that there are no unexpanded entries in the list of parameters +$LibraryNameList = $LibraryNameList | ForEach-Object { @($_.Split(',').Trim()) } +$FolderPrefixPurgeList = $FolderPrefixPurgeList | ForEach-Object { @($_.Split(',').Trim()) } + foreach ($library in $LibraryNameList) { Purge-Library -LibraryName $library -PurgeBeforeTimestamp $PurgeBeforeTimestamp -FolderPrefixPurgeList $FolderPrefixPurgeList -SiteSuffix $siteSiffix } \ No newline at end of file