Skip to content

Commit

Permalink
bugfix: Check if locally available sbt is actually a file
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Sep 9, 2024
1 parent 47f3641 commit 711878a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ case class SbtBuildTool(
val allPaths = projectRoot :: envPaths.map(AbsolutePath(_))
allPaths.collectFirst { path =>
path.resolve("sbt") match {
case sbtPath if sbtPath.exists => sbtPath.toString()
case sbtPath if sbtPath.exists && sbtPath.isFile => sbtPath.toString()
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/slow/src/test/scala/tests/sbt/SbtBloopLspSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ class SbtBloopLspSuite

test("basic") {
cleanWorkspace()
// directory should not be used as sbt script
workspace.resolve("sbt").createDirectories()
for {
_ <- initialize(
s"""|/project/build.properties
Expand Down

0 comments on commit 711878a

Please sign in to comment.