1
0
mirror of https://github.com/jht5945/buildj.git synced 2025-12-28 09:40:04 +08:00

add not auth mode, old maven support

This commit is contained in:
2019-08-14 01:36:21 +08:00
parent 96bffa6552
commit 32362f1fca
3 changed files with 27 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ use std::env;
lazy_static! {
pub static ref VERBOSE: bool = is_verbose();
pub static ref NOAUTH: bool = is_no_auth();
}
pub fn print_usage() {
@@ -39,3 +40,10 @@ pub fn is_verbose() -> bool {
Ok(v) => (v == "TRUE" || v == "true" || v =="YES" || v == "yes" || v == "1"),
}
}
pub fn is_no_auth() -> bool {
match env::var("BUILDJ_NOAUTH") {
Err(_) => false,
Ok(v) => (v == "TRUE" || v == "true" || v =="YES" || v == "yes" || v == "1"),
}
}