mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 02:21:46 +04:00
Add initial implementation for running SBT commands.
This commit is contained in:
parent
81db32e148
commit
163e418754
10 changed files with 185 additions and 1 deletions
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue