Skip to content

Commit

Permalink
Make --version output valid YAML for parsing #2856
Browse files Browse the repository at this point in the history
This commit adds a colon so the --version output goes from

ScanCode version 30.1.0
ScanCode Output Format version 2.0.0
SPDX License list version 3.15

to

ScanCode version: 30.1.0
ScanCode Output Format version: 2.0.0
SPDX License list version: 3.15

This will make the output easier to parse since it is valid YAML now.

Signed-off-by: Kevin Ji <kyji1011@gmail.com>
  • Loading branch information
KevinJi22 committed Feb 8, 2022
1 parent 4bd9c8e commit 9f177fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scancode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ def print_examples(ctx, param, value):
def print_version(ctx, param, value):
if not value or ctx.resilient_parsing:
return
click.echo('ScanCode version ' + scancode_config.__version__)
click.echo('ScanCode Output Format version ' + scancode_config.__output_format_version__)
click.echo('SPDX License list version ' + scancode_config.spdx_license_list_version)
click.echo('ScanCode version: ' + scancode_config.__version__)
click.echo('ScanCode Output Format version: ' + scancode_config.__output_format_version__)
click.echo('SPDX License list version: ' + scancode_config.spdx_license_list_version)
ctx.exit()


Expand Down

0 comments on commit 9f177fd

Please sign in to comment.