Merge pull request #1 from chyyran/main

fix: ensure filename is 🥺 before doing anything
This commit is contained in:
Xe Iaso 2023-01-20 22:17:08 -05:00 committed by GitHub
commit 014215beb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {} <command> [args]", env::args().nth(0).unwrap());
return Ok(());