Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#2053 Windows: HOME environment variable not set — no USERPROFILE fallback

Opened by stack72 · 9/7/2026· Shipped 9/8/2026

Description

On Windows, the swamp CLI crashes with HOME environment variable is not set because paths.ts:367 hardcodes HOME lookup without falling back to USERPROFILE (the standard Windows equivalent).

Steps to Reproduce

  1. Run any swamp command on Windows that touches user-level paths (config, source, issue, doctor, summarise, etc.)
  2. The CLI crashes immediately with:
HOME environment variable is not set

Environment

  • Windows Server 2022 (GitHub Actions windows-latest)
  • swamp version: 20260902.194129.0-sha.d1808bea
  • Discovered via the Windows UAT runner (swamp-uat#363)

Impact

16 UAT tests fail across multiple shards (misc, data-repo-doctor, model-vault-config-report, e2e). Any command that resolves ~/.swamp/ or ~/.config/ is affected.

Suggested Fix

In paths.ts:367, fall back to USERPROFILE when HOME is not set:

const home = Deno.env.get("HOME") ?? Deno.env.get("USERPROFILE");

This is the standard Deno pattern — Deno.env.get("HOME") returns undefined on Windows, while USERPROFILE is always set (e.g. `C:\Users[REDACTED]

02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 9 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

9/8/2026, 3:44:37 AM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack729/8/2026, 3:18:13 AM

Sign in to post a ripple.