Skip to content

Commit

Permalink
Disable-Pog: Fix missing include and fix Pog Disable block
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejKafka committed Feb 9, 2025
1 parent 3a5ae4d commit 39aae69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/Pog/container/Env_Disable.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using module ..\Utils.psm1
. $PSScriptRoot\..\header.ps1

# this must NOT be an advanced funtion, otherwise we lose error message position from the manifest scriptblock
Expand Down
4 changes: 2 additions & 2 deletions pog.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@
Import-Module Microsoft.PowerShell.Security

# clean up the Start menu directory
$StartMenuDir = [Pog.PathConfig]::StartMenuExportDir
$StartMenuDir = [Pog.InternalState]::PathConfig.ExportedShortcutDir
if (Test-Path $StartMenuDir) {
if (ls $StartMenuDir | select -First 1) {
Write-Warning ("The Pog start menu subdirectory at '$StartMenuDir' exists, but it's not empty. " +`
"Either uninstall all other packages before disabling Pog, or delete the directory manually.")
} else {
# Start menu exists and is empty
Remove-Item -Force -Recurse ([Pog.PathConfig]::StartMenuExportDir)
Remove-Item -Force -Recurse $StartMenuDir
Write-Host "Removed the Pog Start menu subdirectory at '$StartMenuDir'."
}
}
Expand Down

0 comments on commit 39aae69

Please sign in to comment.