Skip to content

Commit c56d2e0

Browse files
committed
more bug fixes
1 parent 36fa5af commit c56d2e0

13 files changed

Lines changed: 11 additions & 2 deletions

File tree

installer/src/main.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ use std::process::Command;
77
fn main() {
88
println!(
99
"{}",
10-
"Welcome to the DormNet installer for your Linux Service Container"
10+
"Welcome to the DormNet installer for your Linux Container"
11+
.green()
1112
.bold()
1213
.to_string()
1314
);
@@ -29,13 +30,21 @@ fn main() {
2930
.expect("Failed to run npm install");
3031

3132
println!("{}", "Building the Next.js app...".bold().to_string());
32-
Command::new("npm")
33+
let build_status = Command::new("npm")
3334
.arg("run")
3435
.arg("build")
3536
.current_dir("../dormnet")
3637
.status()
3738
.expect("Failed to run npm run build");
3839

40+
if !build_status.success() {
41+
eprintln!(
42+
"{}",
43+
"Next.js build failed. Aborting installation.".red().bold()
44+
);
45+
std::process::exit(1);
46+
}
47+
3948
println!("{}", "Creating systemd Service...".bold().to_string());
4049
let service_name = "dormnet.service";
4150
let service_content = format!(

installer/target/debug/incremental/installer-35j7uh2vvvqs8/s-h74mb76166-01fvcom-3dv1fvabflgpwcbrl1m2qftmx/work-products.bin renamed to installer/target/debug/incremental/installer-35j7uh2vvvqs8/s-h74mgdmcrn-09fj7yp-a45b6qpbyaoq9xpotrdb52aqd/work-products.bin

File renamed without changes.

installer/target/debug/incremental/installer-35j7uh2vvvqs8/s-h74mb76166-01fvcom.lock renamed to installer/target/debug/incremental/installer-35j7uh2vvvqs8/s-h74mgdmcrn-09fj7yp.lock

File renamed without changes.

0 commit comments

Comments
 (0)