diff --git a/PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1 b/PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1 index d4946acc..30e77848 100644 --- a/PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1 +++ b/PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1 @@ -335,7 +335,14 @@ function Start-GSDriveFileUpload { } finally { if ($Host.Name -and $Host.Name -notlike "Windows*PowerShell*ISE*") { - [System.Console]::CursorVisible = $true + try { + [System.Console]::CursorVisible = $true + } + catch { + if ($Error[0].Exception.Message -eq 'Exception setting "CursorVisible": "The handle is invalid."') { + $Global:Error.Remove($Global:Error[0]) + } + } } Stop-GSDriveFileUpload @successParam } diff --git a/build.ps1 b/build.ps1 index db7a627b..a8ce6aa5 100644 --- a/build.ps1 +++ b/build.ps1 @@ -137,14 +137,6 @@ else { " + NuGet API key is not null : $($null -ne $env:NugetApiKey)`n" + " + Commit message matches '!deploy' : $($env:BUILD_SOURCEVERSIONMESSAGE -match '!deploy') [$env:BUILD_SOURCEVERSIONMESSAGE]"| Write-Host -ForegroundColor Green } - <# - if (-not (Get-Module BuildHelpers -ListAvailable | Where-Object {$_.Version -eq '2.0.1'})) { - Write-Verbose "Installing BuildHelpers v2.0.1" -Verbose - Install-Module 'BuildHelpers' -RequiredVersion 2.0.1 -Scope CurrentUser -Repository PSGallery -AllowClobber -SkipPublisherCheck -Force - } - Write-Verbose "Importing BuildHelpers v2.0.1" -Verbose - Import-Module 'BuildHelpers' -RequiredVersion 2.0.1 - #> Write-BuildLog "Resolving necessary modules" $moduleDependencies.Name | Resolve-Module -UpdateModules -Verbose Write-BuildLog "Modules resolved" diff --git a/psake.ps1 b/psake.ps1 index 10767474..24a2eecf 100644 --- a/psake.ps1 +++ b/psake.ps1 @@ -340,7 +340,7 @@ Task Import -Depends Compile { } -description 'Imports the newly compiled module' $pesterScriptBlock = { - 'Pester' | Resolve-Module + 'Pester' | Resolve-Module -UpdateModules -Verbose Push-Location Set-Location -PassThru $outputModDir if (-not $ENV:BHProjectPath) {