about summary refs log tree commit diff
path: root/pkgs/profpatsch/nman
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-02-17 18:53:51 +0100
committersternenseemann <sternenseemann@systemli.org>2021-02-25 19:52:33 +0100
commit1682bf4dc0e70c50ca791e811de99e8d25f9ccc7 (patch)
treea4fdec448163c69bfc1bac96b25f42cf2d35557e /pkgs/profpatsch/nman
parent6ef9d4873e2fa11fe845e8641653eda3ce82ffa5 (diff)
pkgs/profpatsch/nman: use 100 for usage errors
In the Profpatsch universe, execline reigns surpreme. Therefore we must
bow to its (understandable) rejection of POSIX and use 100 as the user
error instead of the 64 of sysexits.h. This makes a lot of sense, as we
are already using execline conventions for the other exit codes.
Diffstat (limited to 'pkgs/profpatsch/nman')
-rw-r--r--pkgs/profpatsch/nman/nman.12
-rw-r--r--pkgs/profpatsch/nman/nman.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/profpatsch/nman/nman.1 b/pkgs/profpatsch/nman/nman.1
index c6255827..b686b931 100644
--- a/pkgs/profpatsch/nman/nman.1
+++ b/pkgs/profpatsch/nman/nman.1
@@ -155,7 +155,7 @@ Success.
 .It 1
 An expected error like a man page not being found or the requested
 package not existing.
-.It 64
+.It 100
 An usage error, indicating the user is invoking
 .Nm
 wrong.
diff --git a/pkgs/profpatsch/nman/nman.rs b/pkgs/profpatsch/nman/nman.rs
index 6cb5f54c..1672e449 100644
--- a/pkgs/profpatsch/nman/nman.rs
+++ b/pkgs/profpatsch/nman/nman.rs
@@ -37,8 +37,8 @@ impl NmanError<'_> {
             NmanError::Instantiate(_, _) => 1,
             // missing executable
             NmanError::Execution(_) => 127,
-            // user error, EX_USAGE (sysexits.h)
-            NmanError::Usage => 64,
+            // user error
+            NmanError::Usage => 100,
             // everything else is an unexpected error
             _ => 101
         }