async fn exec(app: Arc<App>) -> Result<()> {
        let script = app.args.value_of("script-name").unwrap().trim();

        if cfg!(target_os = "windows") {
            Command::new("cmd").args(&["/C", "babel"]).spawn().unwrap();
        } else if cfg!(target_os = "linux") {
            println!("{}", format!("$ {}", script).truecolor(156, 156, 156));

            let mut child = Command::new(format!("node_modules/.bin/{}", script))
                .stdout(Stdio::inherit())
                .stderr(Stdio::inherit())
                .spawn()
                .expect("failed to execute child");

            child.wait().unwrap();
        }
        Ok(())
    }
/// Execute the `volt run` command
///
/// Interactively create or update a package.json file for a project.
/// ## Arguments
/// * `app` - Instance of the command (`Arc<App>`)
/// * `packages` - List of packages to add (`Vec<String>`)
/// * `flags` - List of flags passed in through the CLI (`Vec<String>`)
/// ## Examples
/// ```
/// // Run a defined script.
/// // .exec() is an async call so you need to await it
/// Run.exec(app, vec![], vec!["--yes"]).await;
/// ```
/// ## Returns
/// * `Result<()>`
Execute the `volt run` command
Interactively create or update a package.json file for a project.
Execute the ` volt run ` command Interactively create or update a package . json file for a project .
async fn exec(app: Arc<App>) -> Result<()> {
        let script = app.args.value_of("script-name").unwrap().trim();
        if cfg!(target_os = "windows") {
            Command::new("cmd").args(&["/C", "babel"]).spawn().unwrap();
        } else if cfg!(target_os = "linux") {
            println!("{}", format!("$ {}", script).truecolor(156, 156, 156));
            let mut child = Command::new(format!("node_modules/.bin/{}", script))
                .stdout(Stdio::inherit())
                .stderr(Stdio::inherit())
                .spawn()
                .expect("failed to execute child");
            child.wait().unwrap();
        }
        Ok(())
    }
async fn exec ( app : Arc < App > ) -> Result < ( ) > { let script = app . args . value_of ( " " ) . unwrap ( ) . trim ( ) ; if cfg ! ( target_os " " ) { Command :: new ( " " ) . args ( & [ " " , " " ] ) . spawn ( ) . unwrap ( ) ; } else if cfg ! ( target_os " " ) { println ! ( " " format ( " " script ) truecolor ( 156 156 156 ) ) ; let mut child = Command :: new ( format ! ( " " script ) ) . stdout ( Stdio :: inherit ( ) ) . stderr ( Stdio :: inherit ( ) ) . spawn ( ) . expect ( " " ) ; child . wait ( ) . unwrap ( ) ; } Ok ( ( ) ) }
Execute the `volt run` command
Interactively create or update a package.json file for a project.
Execute the ` volt run ` command Interactively create or update a package . json file for a project .
None
app
Arc<App>
examples
```
Run a defined script.
.exec() is an async call so you need to await it
Run.exec(app, vec![], vec!["--yes"]).await;
```
` ` ` Run a defined script . . exec () is an async call so you need to await it Run . exec ( app vec! [] vec! [ " -- yes " ] ) . await ; ` ` `