diff --git a/src/main.rs b/src/main.rs index 035f014..63d34dd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,23 +56,20 @@ async fn launch(config: String) { ..Default::default() }) .mount_assets() - .mount( - "/", - routes![ - routes::index_page, - routes::pkg_route, - routes::push::upload_pkg, - routes::user::login, - routes::user::login_post, - routes::user::account_page, - routes::ui::pkg_ui, - routes::ui::repo_ui, - routes::user::new_api_key, - routes::user::end_session, - routes::user::change_password, - routes::user::change_password_post - ], - ) + .mount("/", routes![ + routes::index_page, + routes::pkg_route, + routes::push::upload_pkg, + routes::user::login, + routes::user::login_post, + routes::user::account_page, + routes::ui::pkg_ui, + routes::ui::repo_ui, + routes::user::new_api_key, + routes::user::end_session, + routes::user::change_password, + routes::user::change_password_post + ]) .manage(config) .manage(shell) .launch() @@ -114,6 +111,14 @@ pub fn build(image: &str, ci: bool) { "chown -R build /build".to_string(), ]); + if ci { + let chown_cmd = format!( + "chown -R build {}", + std::env::current_dir().unwrap().display() + ); + docker_script.extend([chown_cmd]); + } + if ci { if std::fs::exists("./pacman.conf").unwrap() { println!("-> Using custom pacman.conf");