Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

サブコマンドで指定を間違えてもリターンコードが0になっている #27

Open
cohama opened this issue Oct 8, 2021 · 0 comments

Comments

@cohama
Copy link

cohama commented Oct 8, 2021

$ nextcloud-cli download
NAME:
   nextcloud-cli download - Download remote files or directories

USAGE:
   nextcloud-cli download [command options] FILE [FILE...]

OPTIONS:
   --out value, -o value  set output directory (default: ".")
   --retry value          set max retry count (default: 5)
   --deconflict value     set deconflict strategy (skip/overwrite/newest/error) (default: "error")
   --procs value          set maximum number of processes (default: 10)
   --help, -h             show help (default: false)

$ echo $?
0

大抵のコマンドは引数が足りなかったりした場合は Usage 出すとともに0以外を返す気がします。

$ aws s3 cp
Note: AWS CLI version 2, the latest major version of the AWS CLI, is now stable and recommended for general use. For more information, see the AWS CLI version 2 installation instructions at: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: the following arguments are required: paths

$ echo $?
2
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

No branches or pull requests

1 participant