cargo goodgirl but enby

This commit is contained in:
crispycat 2025-02-08 12:45:48 -05:00
parent 914d67a8dd
commit 0ac372da08
2 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
# cargo-goodgirl
Sometimes getting Rust projects to compile is hard! Wouldn't it be nice if your computer rewarded you by calling you a good girl?
# cargo-goodenby
![enby](/enby.png)
Sometimes getting Rust projects to compile is hard! Wouldn't it be nice if your computer rewarded you by calling you a good enby?
## How it works
1. Install with `cargo install cargo-gg`
1. Use `gg` as a wrapper (e.g. `cargo gg run` to run your Rust project)
1. If your project fails to build, and then it succeeds, cargo will say "Good girl!"
1. Install with `cargo install cargo-ge`
1. Use `ge` as a wrapper (e.g. `cargo ge run` to run your Rust project)
1. If your project fails to build, and then it succeeds, cargo will say "Good enby!"

View File

@ -8,7 +8,7 @@ fn main() -> anyhow::Result<()> {
let mut arg_iter = env::args().peekable();
arg_iter.next();
if arg_iter.peek().map_or(false, |arg| arg == "gg") {
if arg_iter.peek().map_or(false, |arg| arg == "ge") {
let _ = arg_iter.next();
}
@ -20,11 +20,11 @@ fn main() -> anyhow::Result<()> {
let status = cmd.status()?;
let code = status.code().unwrap_or(1);
let path = env::temp_dir().join(".gg-failed");
let path = env::temp_dir().join(".ge-failed");
if code == 0 {
if std::fs::exists(&path)? {
println!("Good girl!");
println!("Good enby!");
let _ = std::fs::remove_file(path);
}