Skip to content

Commit

Permalink
fix(command): remove v prefix from version in generated help text (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Jun 30, 2021
1 parent d93ad7d commit f882abd
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion command/help/_help_generator.ts
Expand Up @@ -72,7 +72,7 @@ export class HelpGenerator {
];
const version: string | undefined = this.cmd.getVersion();
if (version) {
rows.push([bold("Version:"), yellow(`v${this.cmd.getVersion()}`)]);
rows.push([bold("Version:"), yellow(`${this.cmd.getVersion()}`)]);
}
return "\n" +
Table.from(rows)
Expand Down
4 changes: 2 additions & 2 deletions command/test/command/help_command_test.ts
Expand Up @@ -75,7 +75,7 @@ Deno.test({
output,
`
Usage: COMMAND
Version: v1.0.0
Version: 1.0.0
Description:
Expand Down Expand Up @@ -118,7 +118,7 @@ Deno.test({
output,
`
Usage: COMMAND
Version: v1.0.0
Version: 1.0.0
Description:
Expand Down
2 changes: 1 addition & 1 deletion command/test/command/hidden_command_test.ts
Expand Up @@ -36,7 +36,7 @@ Deno.test("hidden command help", () => {
assertEquals(
`
Usage: COMMAND
Version: v1.0.0
Version: 1.0.0
Description:
Expand Down
2 changes: 1 addition & 1 deletion command/test/integration/fixtures/help_command.out
@@ -1,6 +1,6 @@

Usage: completions-test
Version: v1.0.0
Version: 1.0.0

Description:

Expand Down
@@ -1,6 +1,6 @@

Usage: completions-test foo
Version: v1.0.0
Version: 1.0.0

Description:

Expand Down
2 changes: 1 addition & 1 deletion command/test/integration/fixtures/help_option_long.out
@@ -1,6 +1,6 @@

Usage: completions-test
Version: v1.0.0
Version: 1.0.0

Description:

Expand Down
2 changes: 1 addition & 1 deletion command/test/integration/fixtures/help_option_short.out
@@ -1,6 +1,6 @@

Usage: completions-test
Version: v1.0.0
Version: 1.0.0

Description:

Expand Down
2 changes: 1 addition & 1 deletion command/test/option/hidden_test.ts
Expand Up @@ -29,7 +29,7 @@ Deno.test("hidden option help", () => {
assertEquals(
`
Usage: COMMAND
Version: v1.0.0
Version: 1.0.0
Description:
Expand Down

0 comments on commit f882abd

Please sign in to comment.