Skip to content

Commit

Permalink
Fix handling of next-version-from-metadata option
Browse files Browse the repository at this point in the history
The `--next-version-from-metadata` option correctly reads the repo's metadata
to define `config.nextVersion` when `loadConfig` is called. However, it is
immediately overridden on the next line by `argv["next-version"]` which
defaults to "Unreleased" and thus is always truthy.
  • Loading branch information
contolini authored and Turbo87 committed Aug 7, 2021
1 parent 7b05995 commit 4145ae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export async function run() {
nextVersionFromMetadata: argv["next-version-from-metadata"],
});

if (argv["next-version"]) {
if (argv["next-version"] !== NEXT_VERSION_DEFAULT) {
config.nextVersion = argv["next-version"];
}

Expand Down

0 comments on commit 4145ae8

Please sign in to comment.