hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit ec7fe6e0ddaf15b66fd6d036a635e22e54783aef
parent f8a0aa4787622f87f4a2c56f42ccbfe5248b9029
Author: Sebastian <sebastian@sebsite.pw>
Date:   Fri, 29 Sep 2023 22:19:48 -0400

hare version: remove machine-readable output

The output is now always the "human-readable" output. This format is
still easy to parse by machines, and this gets rid of the unintuitive
tty check.

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcmd/hare/version.ha | 7-------
1 file changed, 0 insertions(+), 7 deletions(-)

diff --git a/cmd/hare/version.ha b/cmd/hare/version.ha @@ -4,7 +4,6 @@ use fmt; use getopt; use os; use strings; -use unix::tty; fn version(name: str, cmd: *getopt::command) (void | error) = { let verbose = false; @@ -25,12 +24,6 @@ fn version(name: str, cmd: *getopt::command) (void | error) = { let build_arch = get_arch(os::machine())?; let build_platform = ascii::strlower(os::sysname()); - if (!tty::isatty(os::stdout_file)) { - fmt::printfln("build tags\t+{}+{}\nHAREPATH\t{}", - build_arch.name, build_platform, harepath())?; - return; - }; - fmt::printfln("build tags:\n\t+{}\n\t+{}\nHAREPATH{}:", build_arch.name, build_platform, if (os::getenv("HAREPATH") is str) " (from environment)" else "")?;