Skip to content
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
1 change: 1 addition & 0 deletions src/backdrop.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ function Invoke-BackdropUpgrade {
$tmp = [System.IO.Path]::GetTempFileName()
try {
Save-BackdropFile $rawUrl $tmp -TimeoutSec 60
Unblock-File $tmp -ErrorAction SilentlyContinue
Copy-Item $tmp $modPath -Force
Write-Host "backdrop: upgraded to v$latestVer. Restart PowerShell to use the new version."
}
Expand Down
7 changes: 7 additions & 0 deletions src/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ try {
if ($tmp -and (Test-Path $tmp)) { Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue }
}

# Files fetched via Invoke-WebRequest carry the Mark of the Web (Zone.Identifier),
# which NTFS Copy-Item preserves. Under the default RemoteSigned policy, that mark
# blocks the module from loading in any future session, so strip it here rather
# than relying on the Bypass override below (which only applies to this process).
Unblock-File (Join-Path $destDir 'backdrop.psm1') -ErrorAction SilentlyContinue
Unblock-File (Join-Path $destDir 'backdrop.psd1') -ErrorAction SilentlyContinue

Write-Host "backdrop: installed to $destDir"

# Load the module and enable the scheduled task.
Expand Down