[Gradle] Fix creating empty directory marker for backups
The problem was occurring in the case the first directory for backup does not exist #KT-61273 Fixed
This commit is contained in:
committed by
Space Team
parent
9b9039d512
commit
693b4cf308
-1
@@ -769,7 +769,6 @@ class KotlinGradleIT : KGPBaseTest() {
|
||||
}
|
||||
}
|
||||
|
||||
@Disabled
|
||||
@DisplayName("KT-61273: task output backup works correctly if the first output is absent")
|
||||
@GradleTest
|
||||
fun taskOutputBackupWorksIfFirstOutputIsAbsent(gradleVersion: GradleVersion) {
|
||||
|
||||
+3
-1
@@ -50,7 +50,9 @@ internal class TaskOutputsBackup(
|
||||
)
|
||||
} else if (!outputPath.exists()) {
|
||||
logger.debug("Ignoring $outputPath in making a backup as it does not exist")
|
||||
File(snapshotsDir.get().asFile, index.asNotExistsMarkerFile).createNewFile()
|
||||
val markerFile = File(snapshotsDir.get().asFile, index.asNotExistsMarkerFile)
|
||||
markerFile.parentFile.mkdirs()
|
||||
markerFile.createNewFile()
|
||||
} else {
|
||||
val snapshotFile = snapshotsDir.map { it.file(index.asSnapshotDirectoryName).asFile }
|
||||
logger.debug("Copying $outputPath as $snapshotFile to make a backup")
|
||||
|
||||
Reference in New Issue
Block a user