Skip to content

Error: Os { code: 2, kind: NotFound, message: "No such file or directory" } #11

Description

@BerriJ

This may be a silly question, as I'm not super experienced with writing bash scripts (and Rust), but I'm trying to use nixos-needsreboot to set up a simple email notification. But I don't know how I'm supposed to catch the exit code. I get:

❯ nix run github:thefossguy/nixos-needsreboot -- --dry-run
Error: Os { code: 2, kind: NotFound, message: "No such file or directory" }

~echo $?
1

Is this the supposed behavior? I expected echo $? to print 2 since the output says code: 2 but I'm also a bit unsure whether there is a problem since it complains about "No such file or directory".

Thanks in advance and best regards,
BerriJ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions