-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross compile scala-native-cli with Scala Native
Co-authored-by: Tomasz Godzik <tgodzik@users.noreply.github.com>
- Loading branch information
Showing
390 changed files
with
1,277 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
scalafmt-cli/jvm/src/main/scala/org/scalafmt/cli/CliOptionsUtils.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.scalafmt.cli | ||
|
||
class CliOptionsUtils { | ||
def makeOutputStreamOrWriter(parsed: CliOptions): Output.StreamOrWriter = { | ||
val usesOut = parsed.stdIn || parsed.writeMode.usesOut | ||
val cons = if (usesOut) System.console() else null | ||
if (cons ne null) new Output.FromWriter(cons.writer()) | ||
else new Output.FromStream( | ||
if (parsed.noStdErr || !usesOut) parsed.common.out | ||
else parsed.common.err, | ||
) | ||
} | ||
} |
Oops, something went wrong.