Skip to content

Commit

Permalink
Clarify rmdirs at the start of the task
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed Jul 23, 2020
1 parent ba3f405 commit 859df92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/de/itemis/mps/gradle/BundleMacosJdk.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ open class BundleMacosJdk @Inject constructor(
val scriptsDir = scriptsDir.get().asFile
val tmpDir = tmpDir.get().asFile
try {
// Cleanup temporary directory so stale files do not affect the current task execution
rmdirs(tmpDir)
tmpDir.mkdirs()
val scriptName = "bundle_macos_jdk.sh"
BundledScripts.extractScriptsToDir(scriptsDir, scriptName)
project.exec {
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/de/itemis/mps/gradle/CreateDmg.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ open class CreateDmg @Inject constructor(
val scriptsDir = scriptsDir.get().asFile
val dmgDir = dmgDir.get().asFile
try {
// Cleanup temporary directory so stale files do not affect the current task execution
rmdirs(dmgDir)
dmgDir.mkdirs()
BundledScripts.extractScriptsToDir(scriptsDir, *scripts)
Expand Down

0 comments on commit 859df92

Please sign in to comment.