~sircmpwn/hare unlisted

f5685e6eca5801b2d7606edffb831c173432a237 — Drew DeVault 2 months ago 2b5fde2
cmd/hare: print path details to stderr

Signed-off-by: Drew DeVault <sir@cmpwn.com>
1 files changed, 7 insertions(+), 2 deletions(-)

M cmd/hare/subcmds.ha
M cmd/hare/subcmds.ha => cmd/hare/subcmds.ha +7 -2
@@ 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)")!;
			},
		};
	};
};