Skip to content

Commit a0728f7

Browse files
authored
Truncate existing RPM file before writing new one
Fixes nebula-plugins#420
1 parent eecbe1c commit a0728f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/groovy/com/netflix/gradle/plugins/rpm/RpmCopyAction.groovy

+1
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ class RpmCopyAction extends AbstractPackagingCopyAction<Rpm> {
236236
RandomAccessFile rpmFile
237237
try {
238238
rpmFile = new RandomAccessFile(task.getArchiveFile().get().asFile, "rw")
239+
rpmFile.setLength(0);
239240
builder.build(rpmFile.getChannel())
240241
logger.info 'Created rpm {}', rpmFile
241242
} finally {

0 commit comments

Comments
 (0)