Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Treat empty TMPDIR as unset #10303

Merged
merged 6 commits into from
Mar 25, 2024
Merged

Conversation

roberth
Copy link
Member

@roberth roberth commented Mar 23, 2024

Motivation

Fixes an instance of

nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.

... which I've been getting in one of my shells for some reason. I have yet to find out why TMPDIR was empty in my shell, but it's no excuse for Nix to break.

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

src/nix-build/nix-build.cc Outdated Show resolved Hide resolved
Fixes an instance of

    nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.

... which I've been getting in one of my shells for some reason.
I have yet to find out why TMPDIR was empty, but it's no reason for
Nix to break.
See preceding commit. Not observed in the wild, but is sensible
and consistent with TMPDIR behavior.
@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Mar 23, 2024
@edolstra edolstra merged commit 6d90287 into NixOS:master Mar 25, 2024
8 checks passed
@roberth roberth added the backport 2.18-maintenance Automatically creates a PR against the branch label Jun 10, 2024

This comment was marked as resolved.

roberth added a commit that referenced this pull request Jun 10, 2024
[Backport 2.18-maintenance] fix: Treat empty TMPDIR as unset (#10303)
tebowy pushed a commit to tebowy/nix that referenced this pull request Jul 11, 2024
This is a squash of upstream PRs NixOS#10303, NixOS#10312 and NixOS#10883.

fix: Treat empty TMPDIR as unset

Fixes an instance of

    nix: src/libutil/util.cc:139: nix::Path nix::canonPath(PathView, bool): Assertion `path != ""' failed.

... which I've been getting in one of my shells for some reason.
I have yet to find out why TMPDIR was empty, but it's no reason for
Nix to break.

(cherry picked from commit c3fb2aa)

fix: Treat empty XDG_RUNTIME_DIR as unset

See preceding commit. Not observed in the wild, but is sensible
and consistent with TMPDIR behavior.

(cherry picked from commit b9e7f5a)

local-derivation-goal.cc: Reuse defaultTempDir()

(cherry picked from commit fd31945)

fix: remove usage of XDG_RUNTIME_DIR for TMP

(cherry picked from commit 1363f51)

tests/functional: Add count()

(cherry picked from commit 6221770)

Remove uncalled for message

(cherry picked from commit b1fe388)

Add build-dir setting

(cherry picked from commit 8b16cce)
Change-Id: Ic7b75ff0b6a3b19e50a4ac8ff2d70f15c683c16a
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.18-maintenance Automatically creates a PR against the branch store Issues and pull requests concerning the Nix store
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants