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

readFile should not fail on invalid paths #5975

Closed
edolstra opened this issue Jan 24, 2022 · 0 comments · Fixed by #5976
Closed

readFile should not fail on invalid paths #5975

edolstra opened this issue Jan 24, 2022 · 0 comments · Fixed by #5976
Assignees
Labels
Milestone

Comments

@edolstra
Copy link
Member

This fails:

$ nix-env --store dummy:// -f /nix/store/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source -qaP --drv-path --show-trace
error: path '/nix/store/8sm7wycza5fl6lnsmw11sn4vqkvw4xyh-source' is not valid

(where /nix/store/8sm7... is a valid path in the real Nix store) because of a use of builtins.readFile somewhere.

The root cause is that /nix/store/8sm7... is seen as a store path.

Hopefully this will be fixed by #3121 since we will have different source accessors for things in the user's filesystem vs things in the store denoted by --store. (See also #5973.)

@edolstra edolstra added the bug label Jan 24, 2022
@edolstra edolstra added this to the nix-2.7 milestone Jan 24, 2022
@edolstra edolstra self-assigned this Jan 24, 2022
@edolstra edolstra modified the milestones: nix-2.7, nix-2.6 Jan 24, 2022
edolstra added a commit to edolstra/nix that referenced this issue Jan 24, 2022
thomasjm pushed a commit to codedownio/nix that referenced this issue Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant