Skip to content

Commit

Permalink
Fix confusing prompt with empty file list (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
bunysae authored Dec 27, 2020
1 parent 8445136 commit ca3d830
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/git-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ exports.latestTag = async () => {
exports.newFilesSinceLastRelease = async () => {
try {
const {stdout} = await execa('git', ['diff', '--name-only', '--diff-filter=A', await this.latestTag(), 'HEAD']);
if (stdout.trim().length === 0) {
return [];
}

const result = stdout.trim().split('\n').map(row => row.trim());
return result;
} catch {
Expand Down

0 comments on commit ca3d830

Please sign in to comment.