Skip to content

nix develop bad diagnostics when flake.nix is unstaged in source tree #14542

@gilescope

Description

@gilescope

nix develop fails when flake.nix is not in source tree:

error: source tree referenced by 'git+file:///Users/...ref=refs/heads/main&rev=d42e1a0ff5cb7ab2a8d512f470bf3c9407765483' does not contain a 'flake.nix' file

This is fine, yes it's not in the source tree. The bug is that nix develop doesn't then detect that there is a flake.nix that's in the right place but hasn't been staged / committed. Good software has good diagnostics - we can be kinder to our users for this very common case.

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