Compare commits
2 commits
2617c19227
...
515f6da05c
Author | SHA1 | Date | |
---|---|---|---|
515f6da05c | |||
02d06b68ef |
2 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pride"
|
name = "pride"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
10
src/main.rs
10
src/main.rs
|
@ -1,4 +1,7 @@
|
||||||
use std::process::exit;
|
use std::{
|
||||||
|
io::{ stdout, IsTerminal },
|
||||||
|
process::exit
|
||||||
|
};
|
||||||
|
|
||||||
use pico_args::Arguments;
|
use pico_args::Arguments;
|
||||||
|
|
||||||
|
@ -35,6 +38,11 @@ fn main() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !stdout().is_terminal() {
|
||||||
|
println!("pride: output must be a terminal");
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
// get small flag
|
// get small flag
|
||||||
let small = args.contains(["-s", "--small"]);
|
let small = args.contains(["-s", "--small"]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue