/// Build the Command to launch Qemu emulator running Fuchsia.
Build the Command to launch Qemu emulator running Fuchsia.
Build the Command to launch Qemu emulator running Fuchsia .
fn build_emulator_cmd(&self, emu_binary: &PathBuf) -> Result<Command> {
        let mut cmd = Command::new(&emu_binary);
        cmd.args(&self.emulator_configuration.flags.args);
        let extra_args = self
            .emulator_configuration
            .flags
            .kernel_args
            .iter()
            .map(|x| x.to_string())
            .collect::<Vec<_>>()
            .join(" ");
        if extra_args.len() > 0 {
            cmd.args(["-append", &extra_args]);
        }
        if self.emulator_configuration.flags.envs.len() > 0 {
            cmd.envs(&self.emulator_configuration.flags.envs);
        }
        Ok(cmd)
    }
fn build_emulator_cmd ( & self , emu_binary : & PathBuf ) -> Result < Command > { let mut cmd = Command :: new ( & emu_binary ) ; cmd . args ( & self . emulator_configuration . flags . args ) ; let extra_args = self . emulator_configuration . flags . kernel_args . iter ( ) . map ( | x | x . to_string ( ) ) . collect :: < Vec < _ > > ( ) . join ( " " ) ; if extra_args . len ( ) > 0 { cmd . args ( [ " " , & extra_args ] ) ; } if self . emulator_configuration . flags . envs . len ( ) > 0 { cmd . envs ( & self . emulator_configuration . flags . envs ) ; } Ok ( cmd ) }
Build the Command to launch Qemu emulator running Fuchsia.
Build the Command to launch Qemu emulator running Fuchsia .
&self
emu_binary
&PathBuf