Skip to content

all: change remaining usage codes of 2 to 1 for GNU compat#3922

Merged
sylvestre merged 2 commits intouutils:mainfrom
tertsdiepraam:fix-usage-exit-codes
Sep 10, 2022
Merged

all: change remaining usage codes of 2 to 1 for GNU compat#3922
sylvestre merged 2 commits intouutils:mainfrom
tertsdiepraam:fix-usage-exit-codes

Conversation

@tertsdiepraam
Copy link
Collaborator

Closes #3102

Changes the exit code for the utils below from 2 to 1. A few utils remain with more complicated errors.

  • arch
  • basename
  • chgrp
  • chmod
  • chown
  • cksum
  • comm
  • csplit
  • cut
  • date
  • dd
  • df
  • dircolors
  • dirname
  • du
  • expand
  • factor
  • fmt
  • fold
  • groups
  • head
  • hostname
  • id
  • install
  • join
  • kill
  • link
  • ln
  • logname
  • mkdir
  • mkfifo
  • mknod
  • mv
  • nl
  • nproc
  • numfmt
  • od
  • paste
  • pathchk
  • pinky
  • ptx
  • pwd
  • readlink
  • rm
  • rmdir
  • seq
  • shred
  • shuf
  • split
  • stat
  • stty
  • sum
  • sync
  • tac
  • tail
  • tee
  • touch
  • tr
  • tsort
  • uname
  • unexpand
  • uniq
  • unlink
  • uptime
  • users
  • wc
  • who
  • whoami
  • yes

@sylvestre
Copy link
Contributor

do you think we could have a test to verify that we don't regress? :)

@tertsdiepraam
Copy link
Collaborator Author

I was worried you were gonna ask that :) I've added a simple test for all the utils.

@sylvestre
Copy link
Contributor

ah ah, yeah, I am quite predictable :) isn't it @calixteman ? :)

@calixteman
Copy link

ah ah, yeah, I am quite predictable :) isn't it @calixteman ? :)

Oh yeah 😄

@tertsdiepraam
Copy link
Collaborator Author

I've now included some more utils that were off (like the ones that should return 125) and I included tests for them.

@sylvestre
Copy link
Contributor

Nice side effect
Warning: Congrats! The gnu test tests/misc/env is no longer failing!

@sylvestre sylvestre merged commit e40f175 into uutils:main Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Usage errors from clap produce exit status 2 but GNU programs produce exit status 1

3 participants