8000 Fix outdated use of STDOUT/STDERR · yorickpeterse/clogs@a379e0d · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Fix outdated use of STDOUT/STDERR
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Oct 28, 2024
1 parent 7f9a007 commit a379e0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.inko
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import clogs.cli
import std.env (arguments, working_directory)
import std.io (Write)
import std.stdio (STDERR, STDOUT)
import std.stdio (Stderr, Stdout)
import std.sys (exit)

class async Main {
fn async main {
# This is needed to work around
# https://github.com/inko-lang/inko/issues/631.
let out = STDOUT.new as Write
let out = Stdout.new as Write
let pwd = working_directory.or_else(fn (_) { '.'.to_path })

match cli.run(arguments, pwd, out) {
case Ok(_) -> {}
case Error(e) -> {
# Until https://github.com/inko-lang/inko/issues/634 is implemented, we
# just unconditionally use colors.
STDERR.new.print('\e[31;1merror\e[0m: ${e}')
Stderr.new.print('\e[31;1merror\e[0m: ${e}')
exit(1)
}
}
Expand Down

0 comments on commit a379e0d

Please sign in to comment.
0