Skip to content

Commit e52ba4e

Browse files
Fix error handling when removing obsolete Helpers module directory
1 parent 7d2c33c commit e52ba4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/main.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ param()
66
$PSModulePath = $env:PSModulePath -split [System.IO.Path]::PathSeparator | Select-Object -First 1
77
Remove-Module -Name Helpers -Force -ErrorAction SilentlyContinue
88
Get-Command -Module Helpers | ForEach-Object { Remove-Item -Path function:$_ -Force }
9-
Get-Item -Path "$PSModulePath/Helpers/999.0.0" | Remove-Item -Recurse -Force
9+
Get-Item -Path "$PSModulePath/Helpers/999.0.0" -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force
1010
$modulePath = New-Item -Path "$PSModulePath/Helpers/999.0.0" -ItemType Directory -Force | Select-Object -ExpandProperty FullName
1111
Copy-Item -Path "$PSScriptRoot/Helpers/*" -Destination $modulePath -Recurse -Force
1212
LogGroup 'Importing module' {

0 commit comments

Comments
 (0)