'sbt: Getting error output from an external process (yarn)

We run into a problem with 'yarn build' command run from build.sbt:

println(Process("yarn build", frontEndFile).!!)

The output is just:

[info] yarn build 3456
[error] java.lang.RuntimeException: Nonzero exit value: 1

But we don't see the acutal error output from yarn. How can we get that error output from the yarn process?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source