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:
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user