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

Suggest git add -N when that would fix a file not being found in a flake #8389

Open
remexre opened this issue May 23, 2023 · 0 comments
Open
Labels
error-messages Confusing messages and better diagnostics feature Feature request or proposal flakes

Comments

@remexre
Copy link

remexre commented May 23, 2023

Is your feature request related to a problem? Please describe.

A common "oh, right, I forgot about that" when switching to flakes is not having remembered to git add files after creating them. The current error message is

error: getting status of '/nix/store/vlks3d7fr5ywc923pvqacx2bkzm1782j-source/foo': No such file or directory

If you're not expecting this behavior, this is a confusing error!

Describe the solution you'd like

When evaluation of a path expression in a flake results in a path that is not in the flake in the Nix store, but is in the original sources (and the original sources use Git), the error message should note that the error may be because the file is untracked.

It may also suggest git add -N to resolve the issue.

@remexre remexre added the feature Feature request or proposal label May 23, 2023
@roberth roberth added flakes error-messages Confusing messages and better diagnostics labels May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error-messages Confusing messages and better diagnostics feature Feature request or proposal flakes
Projects
None yet
Development

No branches or pull requests

2 participants