exec aint working bro

This commit is contained in:
August 2025-01-08 23:06:18 -05:00
parent 4827e35a0f
commit c9ef381ff5
Signed by: shibedrill
GPG Key ID: 5FE0CB25945EFAA2
2 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# Shibe Bot 0.4.2
# Shibe Bot 1.0.1
[![Rust](https://github.com/shibedrill/shibe-bot/actions/workflows/rust.yml/badge.svg)](https://github.com/shibedrill/shibe-bot/actions/workflows/rust.yml)
[![GitHub License](https://img.shields.io/github/license/shibedrill/shibe-bot)](LICENSE.txt)

View File

@ -156,17 +156,20 @@ fn self_update() -> Result<Infallible, Error> {
let _ = std::fs::File::open(&new_command_path)?;
}
let new_command_args: Vec<_> = std::env::args_os().skip(1).collect();
//let new_command_args: Vec<_> = std::env::args_os().skip(1).collect();
trace!(
"Got current executable path successfully: {}",
new_command_path.display()
);
Err(Box::new(
std::process::Command::new(new_command_path)
.args(&new_command_args)
.exec(),
))
let mut command = std::process::Command::new("systemctl");
let command = command
.arg("--user")
.arg("restart")
.arg("shibe-bot");
Err(Box::new(command.exec()))
}
mod test {