chore: --ui-enabled actually does something
parent
6b6bbc2f75
commit
f200ea824f
13
src/main.rs
13
src/main.rs
|
@ -151,7 +151,7 @@ fn main() -> Result<()> {
|
|||
let desktop_enabled = !matches.is_present("NO_DESKTOP");
|
||||
let trust_executables = matches.is_present("TRUST_EXECUTABLES");
|
||||
let ui_enabled = ui_path.is_ok() && !matches.is_present("NO_UI");
|
||||
let browser_enabled = desktop_enabled && !matches.is_present("NO_BROWSER");
|
||||
let browser_enabled = desktop_enabled && ui_enabled && !matches.is_present("NO_BROWSER");
|
||||
|
||||
let preview_path = upend.path.join("previews");
|
||||
#[cfg(feature = "previews")]
|
||||
|
@ -267,11 +267,14 @@ fn main() -> Result<()> {
|
|||
.service(routes::get_jobs)
|
||||
.service(routes::get_info);
|
||||
|
||||
if let Some(ui_path) = &ui_path {
|
||||
app.service(actix_files::Files::new("/", ui_path).index_file("index.html"))
|
||||
} else {
|
||||
app
|
||||
if ui_enabled {
|
||||
if let Some(ui_path) = &ui_path {
|
||||
return app
|
||||
.service(actix_files::Files::new("/", ui_path).index_file("index.html"));
|
||||
}
|
||||
}
|
||||
|
||||
app
|
||||
});
|
||||
|
||||
let bind_result = server.bind(&bind);
|
||||
|
|
Loading…
Reference in New Issue