Skip to content

Commit 81f5475

Browse files
Fix scalacOptions handling in build
doh
1 parent 0d09ebf commit 81f5475

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

project/settings.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ trait ScalaCliScalafixModule extends ScalafixModule with ScalaCliCompile {
866866
else {
867867
val len = l.length
868868
val idx = l.indexWhere(_.startsWith("-sourceroot"))
869-
if (idx < len - 1) l.take(idx) ++ l.drop(idx + 2)
869+
if (idx >= 0 && idx < len - 1) l.take(idx) ++ l.drop(idx + 2)
870870
else l
871871
}
872872
}

0 commit comments

Comments
 (0)