Skip to content

build: an install under an unset $HOME, $INSTALL_BINDIR or $INSTALL_LIBDIR is refused (#970) - #2706

Merged
ehartford merged 1 commit into
fix-971from
fix-970
Oct 26, 2026
Merged

ehartford merged 1 commit into
fix-971from
fix-970

Conversation

@ehartford

@ehartford ehartford commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: build_graph_expand_install_path (src/BuildGraphSupport.w)
expanded a $HOME/ prefix only when HOME was set and otherwise fell through
to the project-relative resolver; build_graph_install_file's guard compared
the resolved path with the original, which it never equals. With HOME unset
$HOME/triage-970-installed was installed into ./$HOME/triage-970-installed
and the build went green.

build_graph_install_prefix_unset names the install variable a destination
starts with whose value is empty, and the install refuses it before
expanding: "install target 'inst' installs under $HOME, which is not set".

Test: test/internals/build_graph_install_prefix_test.w (the predicate with
HOME empty and set). By hand with the installed compiler, env -u HOME with build :inst went green and wrote ./$HOME/triage-970-installed.

Closes #970

…IBDIR is refused (#970)

Root cause: build_graph_expand_install_path (src/BuildGraphSupport.w)
expanded a `$HOME/` prefix only when HOME was set and otherwise fell through
to the project-relative resolver; build_graph_install_file's guard compared
the resolved path with the original, which it never equals. With HOME unset
`$HOME/triage-970-installed` was installed into ./$HOME/triage-970-installed
and the build went green.

build_graph_install_prefix_unset names the install variable a destination
starts with whose value is empty, and the install refuses it before
expanding: "install target 'inst' installs under $HOME, which is not set".

Test: test/internals/build_graph_install_prefix_test.w (the predicate with
HOME empty and set). By hand with the installed compiler, `env -u HOME with
build :inst` went green and wrote ./$HOME/triage-970-installed.
@ehartford
ehartford added this pull request to stack #2713 October 26, 2026 00:31
@ehartford ehartford changed the title fix 970 build: an install under an unset $HOME, $INSTALL_BINDIR or $INSTALL_LIBDIR is refused (#970) Oct 26, 2026
@ehartford
ehartford marked this pull request as ready for review October 26, 2026 00:45
@ehartford
ehartford merged commit da991d1 into main Oct 26, 2026
@ehartford
ehartford deleted the fix-970 branch October 26, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unresolved $HOME installs into a literal project directory

1 participant