Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
  • Loading branch information
0ffz committed Nov 11, 2023
2 parents 2350043 + fb9cbc8 commit 16b6d6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/commands/CachedCommand.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package commands

import evalBash
import java.nio.file.LinkOption
import java.nio.file.Path
import java.time.LocalDateTime
import kotlin.io.path.*
Expand All @@ -19,6 +20,7 @@ class CachedCommand(val command: String, val path: Path, val expiration: Duratio
}

val evaluated = command.evalBash(env = mapOf()).getOrThrow()
path.deleteIfExists()
path.createParentDirectories().createFile().writeText(evaluated)
// write expiration date
if (expiration != null) {
Expand Down

0 comments on commit 16b6d6c

Please sign in to comment.