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

Inconsistent behavior between --help and -h options in Caliper CLI #1661

Open
argbet21 opened this issue Nov 23, 2024 · 2 comments
Open

Inconsistent behavior between --help and -h options in Caliper CLI #1661

argbet21 opened this issue Nov 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@argbet21
Copy link
Contributor

Which Caliper version are you using?

0.6.0

Which Node.JS version are you using?

20.18.1

Which operating system are you using?

Debian GNU/Linux 12 (bookworm)

Please provide some context for your error. For example, when did the error occur? What were you trying to achieve, and how?

I was exploring the CLI help options of Caliper to familiarize myself with available commands and noticed a discrepancy in outputs between the --help and -h options.

What was the observed incorrect behavior?

The output of npx caliper --help differs from npx caliper -h. Specifically:

npx caliper --help outputs:

Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

npx caliper -h outputs:

caliper <command>

Commands:
  caliper bind [options]       Bind Caliper to a specific SUT and its SDK version
  caliper launch <subcommand>  Launch a Caliper process either in a manager or worker role.
  caliper unbind [options]     Unbind Caliper from a previously bound SUT and its SDK version
  caliper completion           generate completion script

Options:
  --help, -h  Show usage information  [boolean]
  --version   Show version information  [boolean]

Examples:
  caliper bind
  caliper unbind
  caliper launch manager
  caliper launch worker

For more information on Hyperledger Caliper: https://hyperledger.github.io/caliper/

Please provide the error logs and their surroundings.

N/A — no errors.

Please provide your benchmark configuration file content, if possible.

No response

Please provide your network configuration file content, if possible.

No response

Please provide your workload module content, if possible.

No response

Please provide any additional information you deem relevant to the error.

No response

@davidkel
Copy link
Contributor

davidkel commented Nov 23, 2024

Could be an issue with the version of yargs being used
yargs/yargs#1018

@davidkel davidkel added the bug Something isn't working label Dec 10, 2024
@shadowspawn
Copy link

shadowspawn commented Dec 30, 2024

This is an interaction with the nconf package being used in caliper. The truncated help command is being produced as a side-affect of CaliperUtils.getLogger() and terminating the program before it even reaches the code for the custom yargs parser.

const { CaliperUtils } = require('@hyperledger/caliper-core');
const Logger = CaliperUtils.getLogger('cli');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants