Skip to content

./run_macaron.sh analyze -h does not work as expected #460

@nathanwn

Description

@nathanwn

Info

Macaron version: 0.4

Issue

The run_macaron.sh script does not behave as expected when running run_macaron.sh analyze -h: instead of printing the help text for the analyze action, it prints the help text of the macaron command.

> ./scripts/release_scripts/run_macaron.sh -h
Setting default output directory to /home/<user>/dev/orcl/macaron-ws/repo-finder-refactor/output.
Running ghcr.io/oracle/macaron:latest
latest: Pulling from oracle/macaron
Digest: sha256:e980f4eee44d981210e8dc9d3eca9109220d44ef407adb011e2bc9c37527c736
Status: Image is up to date for ghcr.io/oracle/macaron:latest
usage: macaron [-h] [-V] [-v] [-o OUTPUT_DIR] [-dp DEFAULTS_PATH] [-lr LOCAL_REPOS_PATH] {analyze,dump-defaults,verify-policy} ...

positional arguments:
  {analyze,dump-defaults,verify-policy}
                        Run macaron <action> --help for help

options:
  -h, --help            show this help message and exit
  -V, --version         Show Macaron's version number and exit
  -v, --verbose         Run Macaron with more debug logs
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
                        The output destination path for Macaron
  -dp DEFAULTS_PATH, --defaults-path DEFAULTS_PATH
                        The path to the defaults configuration file.
  -lr LOCAL_REPOS_PATH, --local-repos-path LOCAL_REPOS_PATH
                        The directory where Macaron looks for already cloned repositories.

Expected behavior: the help text of ./run_macaron.sh analyze -h should be similar to the help text of macaron analyze -h.

Cause: the ./run_macaron.sh script always treats the -h flag as a help flag for the main macaron command, but not the help flag for any of the actions in Macaron (e.g. analyze or verify-policy).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions