pub fn command<S: Display>(&self, cmd: S) -> Result<(), String> {
        match self.package_name.clone() {
            Some(name) => {
                Platform::command(format!("cd {}; {};", PathManager::package_dir(name.to_string()), cmd))?;
            },
            None => {
                Platform::command(cmd)?;
            }
        }
        Ok(())
    }
/// Runs a given command on the proper operating system's shell.
/// If the script has a package declaration, call the command
/// within the package installation directory.
/// 
/// For example: if the package is named `wonderful`, and I call
/// `cat main.rs`, the following command will be run instead:
/// `cd /home/USERNAME/.rapture/wonderful; cat main.rs`
/// 
/// If I dont declare the package name before running a command,
/// the exact command you gave this function is executed instead.
Runs a given command on the proper operating system's shell.
If the script has a package declaration, call the command
within the package installation directory.



If I dont declare the package name before running a command,
the exact command you gave this function is executed instead.
Runs a given command on the proper operating system ' s shell . If the script has a package declaration call the command within the package installation directory . If I dont declare the package name before running a command the exact command you gave this function is executed instead .
pub fn command<S: Display>(&self, cmd: S) -> Result<(), String> {
        match self.package_name.clone() {
            Some(name) => {
                Platform::command(format!("cd {}; {};", PathManager::package_dir(name.to_string()), cmd))?;
            },
            None => {
                Platform::command(cmd)?;
            }
        }
        Ok(())
    }
pub fn command < S : Display > ( & self , cmd : S ) -> Result < ( ) , String > { match self . package_name . clone ( ) { Some ( name ) => { Platform :: command ( format ! ( " " PathManager package_dir ( name to_string ( ) ) cmd ) ) ? ; } , None => { Platform :: command ( cmd ) ? ; } } Ok ( ( ) ) }
Runs a given command on the proper operating system's shell.
Runs a given command on the proper operating system ' s shell .
&self
cmd
S
&self
cmd
S