| ... | @@ -90,31 +90,25 @@ fn main() -> Result<()> { | ... | @@ -90,31 +90,25 @@ fn main() -> Result<()> { |
| 90 | let rt = get_runtime(&target); | 90 | let rt = get_runtime(&target); |
| 91 | | 91 | |
| 92 | let command = match rt.as_str() { | 92 | let command = match rt.as_str() { |
| 93 | "deno" => { | 93 | "deno" => std::process::Command::new("deno") |
| 94 | std::process::Command::new("deno") | 94 | .arg("run") |
| 95 | .arg("run") | 95 | .arg("-A") |
| 96 | .arg("-A") | 96 | .arg(temp_file) |
| 97 | .arg(temp_file) | 97 | .spawn() |
| 98 | .spawn() | 98 | .expect("Failed to execute process"), |
| 99 | .expect("Failed to execute process") | 99 | "node" => std::process::Command::new("node") |
| 100 | } | 100 | .arg(temp_file) |
| 101 | "node" => { | 101 | .spawn() |
| 102 | std::process::Command::new("node") | 102 | .expect("Failed to execute process"), |
| 103 | .arg(temp_file) | 103 | "bun" => std::process::Command::new("bun") |
| 104 | .spawn() | 104 | .arg("run") |
| 105 | .expect("Failed to execute process") | 105 | .arg(temp_file) |
| 106 | } | 106 | .spawn() |
| 107 | "bun" => { | 107 | .expect("Failed to execute process"), |
| 108 | std::process::Command::new("bun") | | |
| 109 | .arg("run") | | |
| 110 | .arg(temp_file) | | |
| 111 | .spawn() | | |
| 112 | .expect("Failed to execute process") | | |
| 113 | } | | |
| 114 | _ => { | 108 | _ => { |
| 115 | println!("Unknown runtime: {}", target); | 109 | println!("Unknown runtime: {}", target); |
| 116 | } | 110 | } |
| 117 | } | 111 | }; |
| 118 | | 112 | |
| 119 | command.wait().unwrap(); | 113 | command.wait().unwrap(); |
| 120 | } | 114 | } |