Skip to content

Bad error when referring to local repo by git url #12935

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

Open
2 tasks
roberth opened this issue Apr 5, 2025 · 0 comments
Open
2 tasks

Bad error when referring to local repo by git url #12935

roberth opened this issue Apr 5, 2025 · 0 comments
Labels
bug error-messages Confusing messages and better diagnostics fetching Networking with the outside (non-Nix) world, input locking

Comments

@roberth
Copy link
Member

roberth commented Apr 5, 2025

Describe the bug

Easy mistake:
inputs.url = "file:///home/user/src/foo";

       … while fetching the input 'file:///home/user/src/foo'

       error: Failed to open archive (Unrecognized archive format)

(Solution: use git+file://)

Steps To Reproduce

Easier reproducer:

$ nix build file://$HOME/src/nixpkgs#hello
error:
       … while fetching the input 'file:///home/user/src/nixpkgs'

       error: Failed to open archive (Unrecognized archive format)

Expected behavior

Error message contains relevant info

  • file URLs are for tarballs only
  • the path is a directory
  • bonus points: provide a suggestion if it's a repo

Metadata

Additional context

Checklist


Add 👍 to issues you find important.

@roberth roberth added bug error-messages Confusing messages and better diagnostics fetching Networking with the outside (non-Nix) world, input locking labels Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error-messages Confusing messages and better diagnostics fetching Networking with the outside (non-Nix) world, input locking
Projects
None yet
Development

No branches or pull requests

1 participant