exec aint working bro
This commit is contained in:
parent
4827e35a0f
commit
c9ef381ff5
@ -1,4 +1,4 @@
|
||||
# Shibe Bot 0.4.2
|
||||
# Shibe Bot 1.0.1
|
||||
|
||||
[](https://github.com/shibedrill/shibe-bot/actions/workflows/rust.yml)
|
||||
[](LICENSE.txt)
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user