Skip to content

nix log fails to find remote log owing to URL encoding #12910

@peterwaller-arm

Description

@peterwaller-arm

Describe the bug

If you have a derivation with a + in the name, nix log <drv> fetching from a substituter will result in a 404. Under the hood, + is the URL encoding for space ( ). Nix needs to translate the filename into a URL through URL encoding when it does a query.

Steps To Reproduce

  1. Copy log of derivation with + in the name to a binary cache such as S3.
  2. Use nix log /nix/store/asdf-foobar+2.drv

Observe failure:

error: build log of '/nix/store/asdf-foobar+2.drv' is not available

Obvious workaround is to URL encode the filename, but that fails without trying to query the remote cache:

error: getting status of '/nix/store/asdf-foobar%2B2.drv': No such file or directory

Expected behavior

It should be possible to do 'nix log' for a derivation with + in the name.

Metadata

nix (Nix) 2.24.8

Also tested:

nix (Nix) 2.29.0pre20250403_5e19252

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions