scala-steward-org / scala-steward

:robot: A bot that helps you keep your projects up-to-date
Apache License 2.0
1.13k stars 491 forks source link

Scalafmt cannot run when buildRoots is set #3359

Open mattfirtion opened 1 month ago

mattfirtion commented 1 month ago

When a buildRoot array is set in .scala-steward.conf and scalafmt is upgraded, Scala Steward tries to run scalafmt --non-interactive from the root of the repository instead of the buildRoot, where .scalafmt.conf most likely lives.

2024-05-20 20:35:48,592 WARN  Post-update hook failed
  org.scalasteward.core.io.process$ProcessFailedException: '"SBT_OPTS=-Xmx2048m -Xss8m -XX:MaxMetaspaceSize=512m" scalafmt --non-interactive' exited with code 16.
  error: missing Scalafmt configuration file.