From 861f8fa86ef58cdc371b0eaeb71e921cef6e9235 Mon Sep 17 00:00:00 2001 From: chyyran Date: Fri, 20 Jan 2023 18:59:55 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20ensure=20name=20is=20=F0=9F=A5=BA=20befo?= =?UTF-8?q?re=20doing=20anything?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 34c48b5..69da220 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,11 @@ use std::{env, io, os::unix::process::CommandExt, process::Command}; use syslog::{unix, Facility::LOG_AUTH, Formatter3164}; fn main() -> io::Result<()> { + if env::args().nth(0).unwrap() != "🥺" { + eprintln!("error: called 🥺 with name {}", env::args().nth(0).unwrap()); + return Ok(()); + } + if env::args().len() == 1 { eprintln!("usage: {} [args]", env::args().nth(0).unwrap()); return Ok(());