Skip to content

Commit 3466903

Browse files
Handle long path names in the "show files added since last release" feature (#579)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent 4ae26d9 commit 3466903

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/git-util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ exports.latestTag = async () => {
1212

1313
exports.newFilesSinceLastRelease = async () => {
1414
try {
15-
const {stdout} = await execa('git', ['diff', '--stat', '--diff-filter=A', await this.latestTag(), 'HEAD']);
16-
const result = stdout.trim().split('\n').slice(0, -1).map(row => row.slice(0, row.indexOf('|')).trim());
15+
const {stdout} = await execa('git', ['diff', '--name-only', '--diff-filter=A', await this.latestTag(), 'HEAD']);
16+
const result = stdout.trim().split('\n').map(row => row.trim());
1717
return result;
1818
} catch {
1919
// Get all files under version control

0 commit comments

Comments
 (0)