Skip to content

Path concatenation weirdness #101

Closed
Closed

Description

@edolstra

This works as expected:

$ echo '/foo + "/"' | nix-instantiate --eval-only -
/foo/

But this doesn't:

$ echo '/foo + "/" + "x"' | nix-instantiate --eval-only -
/foox

Activity

  1. Mathnerd314 commented on Aug 15, 2015

    @Mathnerd314
    Contributor

    Testing in Nix 1.9:

    $ echo '/foo + "/"' | nix-instantiate --eval-only -
    /foo
    $ echo '/foo + "/" + "x"' | nix-instantiate --eval-only -
    /foox
    $ echo '/foo + "x"' | nix-instantiate --eval-only -
    /foox
    $ echo '/foo + ("/" + "x")' | nix-instantiate --eval-only -
    /foo/x
    

    So concatenation acts consistently now, although it's not associative.

  2. added a commit that references this issue on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions