Skip to content

Commit

Permalink
1.1.1.3 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceTimee committed Sep 6, 2024
1 parent 61c7b3b commit ae0d018
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions Console-HostChecker.ps1
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
param ([switch] $trans)
param ([switch] $trans, [switch] $loop)

if ($trans) { Start-Transcript (Join-Path $PSScriptRoot "Trans.log") -UseMinimalHeader | Out-Null }
do {
if ($trans) { Start-Transcript (Join-Path $PSScriptRoot "Trans.log") -UseMinimalHeader | Out-Null }

if ($PSEdition -ne "Core") {
Write-Host "Console HostChecker 需要在 PowerShell 7.x 环境运行"
}
else {
foreach ($ps1File in Get-ChildItem $PSScriptRoot "*.ps1") {
if ($ps1File.FullName -ne $PSCommandPath) { . $ps1File.FullName }
if ($PSEdition -ne "Core") {
Write-Host "Console HostChecker 需要在 PowerShell 7.x 环境运行"
}
else {
foreach ($ps1File in Get-ChildItem $PSScriptRoot "*.ps1") {
if ($ps1File.FullName -ne $PSCommandPath) { . $ps1File.FullName }
}

[App]::new().Main()
}
[App]::new().Main()
}

if ($trans) { Stop-Transcript }
if ($loop) { Start-Sleep 60 }
} while ($loop)

if ($trans) { Stop-Transcript }
else { Read-Host "按回车键结束" }
Read-Host "按回车键结束"

0 comments on commit ae0d018

Please sign in to comment.