summaryrefslogtreecommitdiffstats
path: root/src/commands/build.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-01-20 09:08:15 +0100
committerMatthias Beyer <matthias.beyer@atos.net>2021-01-20 09:08:15 +0100
commitfa4573862d294877b4dd795d3cfa911e557f1f24 (patch)
treed95134c260469fbc9b2a69c28b016d6834f8599b /src/commands/build.rs
parentb180f981b8c93e8379eb3745692fe05830af4a7b (diff)
Move the cleanness check to the "build" command implementation
All other subcommands should be able to run on an unclean repository, but the build command should not. Thus, move this function call from main() to the build() implementation. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r--src/commands/build.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index 8f20b3b..5cc0dc0 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -61,6 +61,7 @@ pub async fn build(
) -> Result<()> {
use crate::db::models::{EnvVar, GitHash, Image, Job, Package, Submit};
+ let _ = crate::ui::package_repo_cleanness_check(&repo_root)?;
let now = chrono::offset::Local::now().naive_local();
let submit_id = uuid::Uuid::new_v4();
println!("Submit {}, started {}", submit_id, now);