Skip to content

Commit 1b75cea

Browse files
Merge pull request #726 from PowershellFrameworkCollective/development
resync
2 parents a39077a + 79ee6cd commit 1b75cea

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

PSFramework/functions/utility/Disable-PSFConsoleInterrupt.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
[CmdletBinding()]
1919
param ()
2020

21-
[Console]::TreatControlCAsInput = $true
22-
}
21+
try { [Console]::TreatControlCAsInput = $true } catch {}
22+
}

PSFramework/functions/utility/Enable-PSFConsoleInterrupt.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
[CmdletBinding()]
1515
param ()
1616

17-
[Console]::TreatControlCAsInput = $false
18-
}
17+
try { [Console]::TreatControlCAsInput = $false } catch {}
18+
}

0 commit comments

Comments
 (0)