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
The
canSudo
function only enablessudo
fornix-build
invocations but the check fails if you use a fully-qualifiednix-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