pub fn exec(&self, args: &[&str]) -> Result<String, Error> {
        debug!(
            "Executing command: {} {}",
            self.command_path,
            itertools::join(args, " ")
        );

        let output = Command::new(&self.command_path).args(args).output()?;

        if output.status.success() {
            let message = str::from_utf8(&output.stdout)?.to_string();
            trace!("command executed successfully with output: {}", message);

            Ok(message)
        } else {
            let message = str::from_utf8(&output.stderr)?.to_string();
            Err(eyre!(
                "command exited with error status {:?} and message: {}",
                output.status.code(),
                message
            ))
        }
    }
/**
       Execute the gaiad command with the given command line arguments, and
       returns the STDOUT result as String.

       This is not the most efficient way of interacting with the CLI, but
       is sufficient for testing purposes of interacting with the `gaiad`
       commmand.

       The function also output debug logs that show what command is being
       executed, so that users can manually re-run the commands by
       copying from the logs.
    */
Execute the gaiad command with the given command line arguments, and
returns the STDOUT result as String.

This is not the most efficient way of interacting with the CLI, but
is sufficient for testing purposes of interacting with the `gaiad`
commmand.

The function also output debug logs that show what command is being
executed, so that users can manually re-run the commands by
copying from the logs.
Execute the gaiad command with the given command line arguments and returns the STDOUT result as String . This is not the most efficient way of interacting with the CLI but is sufficient for testing purposes of interacting with the ` gaiad ` commmand . The function also output debug logs that show what command is being executed so that users can manually re - run the commands by copying from the logs .
pub fn exec(&self, args: &[&str]) -> Result<String, Error> {
        debug!(
            "Executing command: {} {}",
            self.command_path,
            itertools::join(args, " ")
        );
        let output = Command::new(&self.command_path).args(args).output()?;
        if output.status.success() {
            let message = str::from_utf8(&output.stdout)?.to_string();
            trace!("command executed successfully with output: {}", message);
            Ok(message)
        } else {
            let message = str::from_utf8(&output.stderr)?.to_string();
            Err(eyre!(
                "command exited with error status {:?} and message: {}",
                output.status.code(),
                message
            ))
        }
    }
pub fn exec ( & self , args : & [ & str ] ) -> Result < String , Error > { debug ! ( " " self command_path itertools join ( args " " ) ) ; let output = Command :: new ( & self . command_path ) . args ( args ) . output ( ) ? ; if output . status . success ( ) { let message = str :: from_utf8 ( & output . stdout ) ? . to_string ( ) ; trace ! ( " " message ) ; Ok ( message ) } else { let message = str :: from_utf8 ( & output . stderr ) ? . to_string ( ) ; Err ( eyre ! ( " " output status code ( ) message ) ) } }
Execute the gaiad command with the given command line arguments, and
returns the STDOUT result as String.
Execute the gaiad command with the given command line arguments and returns the STDOUT result as String .
&self
args
&[&str]
&self
args
&[&str]