pre-commit/testing/resources/sbt_repo_with_touch_command/project/TouchCommand.scala
2022-12-16 20:21:06 +00:00

13 lines
299 B
Scala

import sbt.Command
import java.nio.file.{Files, Paths}
object TouchCommand {
def touchCommand = Command.args("touch", "args") { (state, args) =>
args.map(Paths.get(_).toAbsolutePath).foreach { path =>
println(f"Creating file: $path")
Files.createFile(path)
}
state
}
}