udisks icon indicating copy to clipboard operation
udisks copied to clipboard

udisksctl info help return 1

Open cenhuil opened this issue 8 months ago • 1 comments

Image

cenhuil avatar Apr 03 '25 07:04 cenhuil

udisksctl info help is actually not a supported/known command so we just print usage and set return code to 1 in that case the same way we do for any other invalid command:

$ udisksctl mount aaa
Usage:
  udisksctl mount [OPTION…]

Mount a filesystem.

Options:
  -p, --object-path         Object to mount
  -b, --block-device        Block device to mount
  -t, --filesystem-type     Filesystem type to use
  -o, --options             Mount options
  --no-user-interaction     Do not authenticate the user if needed

$ echo $?
1

On the other hand, udisksctl help says to use udisksctl COMMAND --help to get help for commands which also returns 1:

$ udisksctl mount --help
Usage:
...

$ echo $?
1

so there is a bug, just a slightly different bug :-)

vojtechtrefny avatar Apr 03 '25 10:04 vojtechtrefny