commit f5685e6eca5801b2d7606edffb831c173432a237
parent 2b5fde226458613c1226410fadeb9bede06e6563
Author: Drew DeVault <sir@cmpwn.com>
Date: Sat, 10 Jul 2021 16:23:03 -0400
cmd/hare: print path details to stderr
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cmd/hare/subcmds.ha b/cmd/hare/subcmds.ha
@@ -1,12 +1,13 @@
use ascii;
+use bufio;
use encoding::utf8;
use fmt;
use fs;
use getopt;
use hare::ast;
use hare::module;
-use os;
use os::exec;
+use os;
use path;
use strings;
@@ -427,7 +428,11 @@ fn version(args: []str) void = {
match (os::getenv("HAREPATH")) {
void => fmt::printfln("HAREPATH\t{}", HAREPATH)!,
- s: str => fmt::printfln("HAREPATH\t{}\t(from environment)", s)!,
+ s: str => {
+ fmt::printf("HAREPATH\t{}", s)!;
+ bufio::flush(os::stdout)!;
+ fmt::errorln("\t(from environment)")!;
+ },
};
};
};