+#!/usr/bin/env pwsh
+
# If a command returns an error, halt the script.
$ErrorActionPreference = 'Stop'
-# If a command returns an error, halt the script.
+#!/usr/bin/env pwsh
+
+# If a command returns an error, halt the script.
$ErrorActionPreference = 'Stop'
# Ignore progress events from cmdlets so Invoke-WebRequest is not painfully slow
-# If a command returns an error, halt the script.
+#!/usr/bin/env pwsh
+
+# If a command returns an error, halt the script.
$ErrorActionPreference = 'Stop'
# Ignore progress events from cmdlets so Invoke-WebRequest is not painfully slow
-# Fetch archive
+#!/usr/bin/env pwsh
+# Fetch archive
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"))
{
# TODO: arch detection
+#!/usr/bin/env pwsh
+
curl.exe -fsSL -A "$Env:WEBI_UA" "https://rootprojects.org/pathman/dist/windows/amd64/pathman.exe" -o "$Env:USERPROFILE\.local\bin\pathman.exe"
+#!/usr/bin/env pwsh
+
$ipv4 = curl.exe -sf https://api.ipify.org
IF(!($ipv4 -eq $null -or $ipv4 -eq "")) {
+#!/usr/bin/env pwsh
+
# do nothing because this is a special case