authorgravatar for 11367844+lino-levan@users.noreply.github.comLino Le Van <11367844+lino-levan@users.noreply.github.com> 2024-01-19 13:38:56-08:00
committergravatar for 11367844+lino-levan@users.noreply.github.comLino Le Van <11367844+lino-levan@users.noreply.github.com> 2024-01-19 13:38:56-08:00
loga97be7f59dd06a4f82c317e68006fcf36c5b8ff4
tree6221a7ae2dcc3995f086f39c73a47dfd2859368f
parente6c1cd9d28b728ce488ac72bcbe6d9ce0a212f8d

chore: fmt


1 files changed, 16 insertions(+), 22 deletions(-)

crates/cli/src/main.rs+16-22
...@@ -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);
9191
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 };
118112
119 command.wait().unwrap();113 command.wait().unwrap();
120 }114 }