Skip to content

Commit

Permalink
muvm-guest: Find actual path for muvm-server before trying to execute it
Browse files Browse the repository at this point in the history
Otherwise this depends on where you run things from. In my case, I
would get:

  $ ./target/debug/muvm -- /bin/false
  Error: Failed to execute `muvm-server` as child process

  Caused by:
      No such file or directory (os error 2)

Signed-off-by: Stefano Brivio <[email protected]>
  • Loading branch information
sbrivio-rh committed Nov 25, 2024
1 parent 8b49072 commit fc03652
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/muvm/src/guest/bin/muvm-guest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use std::process::Command;

use anyhow::{Context, Result};
use log::debug;
use muvm::env::find_muvm_exec;
use muvm::guest::cli_options::options;
use muvm::guest::fex::setup_fex;
use muvm::guest::mount::mount_filesystems;
Expand Down Expand Up @@ -65,7 +66,8 @@ fn main() -> Result<()> {

// Before switching to the user, start another instance of muvm-server to serve
// launch requests as root.
Command::new("muvm-server")
let muvm_server_path = find_muvm_exec("muvm-server")?;
Command::new(muvm_server_path)
.spawn()
.context("Failed to execute `muvm-server` as child process")?;

Expand Down

0 comments on commit fc03652

Please sign in to comment.