Skip to content

Commit

Permalink
not erroring when no previos tag on deleteTag
Browse files Browse the repository at this point in the history
  • Loading branch information
brno32 committed Feb 22, 2021
1 parent 3052fd0 commit 3b9e6c8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const handler = async () => {
const previousTag = gitOperations.getPreviousTag();

if (argv.deleteTag) {
if (!previousTag) {
log.warn("lerna-smart-run", "No previous tag. Skipping")
process.exit(0);
}
log.notice("lerna-smart-run", `Deleting previous tag and exiting`);
gitOperations.deletePreviousTag(previousTag);
process.exit(0);
Expand Down

0 comments on commit 3b9e6c8

Please sign in to comment.