Skip to content

Windows: with build fails when HOME is unset (the default in cmd and PowerShell): the wo store becomes "/.local/with-wo" #1884

Closed

Description

@joshhickson

On Windows, HOME is not set in cmd or PowerShell by default. wo_store_dir (build/wo.w:147-151) returns
ctx.env_input("HOME") ++ "/.local/with-wo", so with HOME unset the store is /.local/with-wo. A plain with build
on main then ends like this, after stage1 and stage2 have built:

error: install target 'pcre2-wo-install-o' output escapes project root without install prefix: /.local/with-wo/pcre2/windows_x86_64-…/pcre2.o

Setting HOME, with either slash direction, makes it pass. Each run below is with build :pcre2-wo-install-o in a
fresh worktree of main 355c20b1, on Windows 10 22H2, with out/ cleaned first:

HOME Result
unset rc 1: install target 'pcre2-wo-install-o' output escapes project root without install prefix: /.local/with-wo/pcre2/windows_x86_64-8debd94c…/pcre2.o
C:\Users\<user> rc 0
C:/Users/<user> rc 0

build/wo.w is unchanged on current main (4a940563). Git Bash sets HOME, which is why builds started from Git Bash
don't see this.

Expected: an empty HOME is refused up front with a diagnostic that names HOME (No Silent Fallbacks), or Windows
falls back to USERPROFILE.

Workaround: set HOME before with build.

Related: #970 (an unresolved $HOME in an install path resolves into the project) and #1077 (the store path
under $HOME is rewritten to a literal $HOME/…).

Activity

  1. ehartford commented on Oct 3, 2026

    @ehartford
    Contributor

    Fixed on main by 3044b9c (stack #1979, battery green on 029574d). comp_home_dir is the one rule (HOME, else USERPROFILE); with neither the build stops at graph time naming them; green store and :install-user use it; fixtures on Mac and win10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions