Skip to content

Commit caa6186

Browse files
committed
Use sbt.IO.copyDirectory
1 parent 1fdb0e6 commit caa6186

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

project/Build.scala

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,13 +1148,8 @@ object Build {
11481148
""".stripMargin)
11491149
}
11501150

1151-
// If .vscode does not exist yet, initialize it with the contents of .vscode-template/
1152-
val vscodeSetting = new File(".vscode/")
1153-
if (!vscodeSetting.exists()) {
1154-
vscodeSetting.mkdir()
1155-
for (file <- new File(".vscode-template/").listFiles)
1156-
java.nio.file.Files.copy(file.toPath, new File(vscodeSetting.getPath() + '/' + file.getName).toPath)
1157-
}
1151+
// If contents .vscode do not exist yet, initialize them with the contents of .vscode-template/
1152+
sbt.IO.copyDirectory(new File(".vscode-template/"), new File(".vscode/"), overwrite = false)
11581153

11591154
state
11601155
}

0 commit comments

Comments
 (0)