Support git flake type
When checking an input like ``nixpkgs.url = "git+https://github.com/SuperSandro2000/nixpkgs.git?shallow=1&ref=nixos-unstable";`` the following error occurs:
```
Traceback (most recent call last):
File "/nix/store/bw8y4yyjwlz01gvi50q2zzaaqwpg0iig-nix-auto-follow/bin/.auto-follow-wrapped", line 9, in <module>
sys.exit(start())
^^^^^^^
File "/nix/store/bw8y4yyjwlz01gvi50q2zzaaqwpg0iig-nix-auto-follow/lib/python3.11/site-packages/nix_auto_follow/cli.py", line 207, in start
if not check_lock_file(LockFile.from_dict(flake_lock_json)):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/bw8y4yyjwlz01gvi50q2zzaaqwpg0iig-nix-auto-follow/lib/python3.11/site-packages/nix_auto_follow/cli.py", line 116, in check_lock_file
f"Please add '{key}.url = \"{flake_lock.nodes[ref].get_url()}\"' or '{other_key}.url = \"{flake_lock.nodes[other_ref].get_url()}'" # noqa: E501
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/bw8y4yyjwlz01gvi50q2zzaaqwpg0iig-nix-auto-follow/lib/python3.11/site-packages/nix_auto_follow/cli.py", line 60, in get_url
raise ValueError(f"Unknown type {original['type']}")
ValueError: Unknown type git
```
关闭于 2024-11-03 1 条评论