Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed [System.Console]::CursorVisible call error from ISE #146

Merged
merged 1 commit into from
Jan 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

* [Changelog](#changelog)
* [2.22.3](#2223)
* [2.22.2](#2222)
* [2.22.1](#2221)
* [2.22.0](#2220)
Expand Down Expand Up @@ -71,6 +72,11 @@

***

## 2.22.3

* [Issue #144](https://github.com/scrthq/PSGSuite/issues/144)
* Updated: `Start-GSDriveFileUpload` to not call `[System.Console]::CursorVisible` when `$Host` is PowerShell ISE

## 2.22.2

* [Issue #144](https://github.com/scrthq/PSGSuite/issues/144)
Expand Down
2 changes: 1 addition & 1 deletion PSGSuite/PSGSuite.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PSGSuite.psm1'

# Version number of this module.
ModuleVersion = '2.22.2'
ModuleVersion = '2.22.3'

# ID used to uniquely identify this module
GUID = '9d751152-e83e-40bb-a6db-4c329092aaec'
Expand Down
8 changes: 6 additions & 2 deletions PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ function Start-GSDriveFileUpload {
}
}
finally {
[Console]::CursorVisible = $true
if ($Host.Name -and $Host.Name -notlike "Windows*PowerShell*ISE*") {
[System.Console]::CursorVisible = $true
}
}
}
End {
Expand Down Expand Up @@ -326,7 +328,9 @@ function Start-GSDriveFileUpload {
}
}
finally {
[Console]::CursorVisible = $true
if ($Host.Name -and $Host.Name -notlike "Windows*PowerShell*ISE*") {
[System.Console]::CursorVisible = $true
}
Stop-GSDriveFileUpload
}
}
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ Update-GSSheetValue Export-GSSheet

[Full CHANGELOG here](https://github.com/scrthq/PSGSuite/blob/master/CHANGELOG.md)

#### 2.22.2
#### 2.22.3

* [Issue #144](https://github.com/scrthq/PSGSuite/issues/144)
* Updated: `Start-GSDriveFileUpload` to `Dispose()` open streams once uploads are completed.
* Added: `Stop-GSDriveFileUpload` to enable cleanup of any remaining open streams.
* Updated: `Get-GSDriveFileUpload` to `Dispose()` any completed streams that are still open.
* Updated: `Start-GSDriveFileUpload` to not call `[System.Console]::CursorVisible` when `$Host` is PowerShell ISE