awakesecurity / nix-delegate

Convenient utility for distributed Nix builds
Other
86 stars 6 forks source link

Fix check for `nix-build` executable #10

Closed Gabriella439 closed 6 years ago

Gabriella439 commented 6 years ago

The canSudo function only enables sudo for nix-build invocations but the check fails if you use a fully-qualified nix-build executable (such as /nix/store/...-nix/bin/nix-build). This changes the check to match against the file name instead of the entire command path