mirror of
https://github.com/sbt/sbt.git
synced 2026-09-06 17:40:06 +02:00
forked run used the project's baseDirectory as the working directory, while non-forked execution inherits sbt's own working directory — so toggling fork silently changed how relative paths resolved. forked run (and forked console) now inherit sbt's working directory, consistent with non-forked execution and `sbtn` expectations.
21 lines
508 B
Markdown
21 lines
508 B
Markdown
|
|
|
|
## Forked run working directory
|
|
|
|
Forked `run` no longer runs in the project's `baseDirectory`; it inherits sbt's
|
|
working directory, matching non-forked behavior. Forked `test` is unchanged. To
|
|
restore the sbt 1.x behavior:
|
|
|
|
```scala
|
|
Compile / run / forkOptions := Def.uncached(
|
|
(Compile / run / forkOptions).value.withWorkingDirectory(Some(baseDirectory.value))
|
|
)
|
|
```
|
|
|
|
## files extension on Classpath
|
|
|
|
```scala
|
|
+ given FileConverter = fileConverter.value
|
|
val cp = (Compile / classpath).value.files
|
|
```
|