ToyVo / nh_darwin

Yet another nix cli helper
European Union Public License 1.2
15 stars 3 forks source link

Fix url based flakes #9

Closed gigamonster256 closed 3 months ago

gigamonster256 commented 3 months ago

Fixes #8 Allows use of url and registry based flakerefs

This pushes the error of a nonexistent flake to nix rather than nh.

Before regardless of whether a flake was nonexistent locally or a non path flakeref:

Error:
   0: Failed to get metadata of flake
   1: No such file or directory (os error 2)

Location:
   src/nixos.rs:47

After when a path based flake is nonexistent locally:

error: could not find a flake.nix file
┏━ 1 Errors: 
┃ error: could not find a flake.nix file
┣━━━                                                            
┗━ ∑ ⚠ Exited with 1 errors reported by nix at 17:00:19 after 0s
Error: 
   0: Command exited with status Exited(1)

Location:
   src/commands.rs:170
ToyVo commented 3 months ago

Thanks for putting in the work to fix this