mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 10:01:46 +04:00
13 lines
299 B
Scala
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
|
|
}
|
|
}
|