Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit e719b3f

Browse files
committed
Escape plugin names in fetched plugins.sbt
1 parent 42926c7 commit e719b3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

project/SbtFile.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class SbtFile(var name: String, var version: String, var plugins: List[Plugin],
6464

6565
if (plugins.nonEmpty) {
6666
for (plugin <- plugins) {
67-
var pluginLine = "\nlazy val %s = (project in file(\"%s\"))".format(plugin.normalizedName, plugin.pluginDirectoryPath)
67+
var pluginLine = "\nlazy val `%s` = (project in file(\"%s\"))".format(plugin.normalizedName, plugin.pluginDirectoryPath)
6868

6969
if (apiProjectPath != "") {
7070
pluginLine += ".dependsOn(apiProject)"
@@ -79,8 +79,8 @@ class SbtFile(var name: String, var version: String, var plugins: List[Plugin],
7979
}
8080

8181
if (defineRoot) {
82-
var rootLine = "\n\nlazy val root = (project in file(\".\")).aggregate(apiProject,%s)"
83-
.format(plugins.map(_.normalizedName).mkString(", "))
82+
var rootLine = "\n\nlazy val root = (project in file(\".\")).aggregate(apiProject, %s)"
83+
.format(plugins.map(p => s"`${p.normalizedName}`").mkString(", "))
8484

8585
if (apiProjectPath != "") {
8686
rootLine += ".dependsOn(apiProject)"

0 commit comments

Comments
 (0)