Skip to content

Commit

Permalink
fix: prevent printing of useless warnings in Windows startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
activeshadow committed Dec 7, 2023
1 parent 5916dc9 commit 3aa28f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/go/tmpl/templates/windows_startup.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ function Phenix-SetStartupStatus($status) {
}

function Phenix-StartupStatusIsSet {
If (-NOT (Test-Path 'HKLM:\Software\phenix')) {
return $false
}

$key = Get-Item -LiteralPath 'HKLM:\Software\phenix' -ErrorAction SilentlyContinue

if ($key) {
Expand All @@ -40,6 +44,10 @@ function Phenix-StartupStatusIsSet {
}

function Phenix-StartupStatusIs($status) {
If (-NOT (Test-Path 'HKLM:\Software\phenix')) {
return $false
}

$key = Get-Item -LiteralPath 'HKLM:\Software\phenix' -ErrorAction SilentlyContinue

if ($key) {
Expand Down

0 comments on commit 3aa28f8

Please sign in to comment.