upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/ngit/main.rs')
-rw-r--r--src/bin/ngit/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/ngit/main.rs b/src/bin/ngit/main.rs
index f405e94..65f6bca 100644
--- a/src/bin/ngit/main.rs
+++ b/src/bin/ngit/main.rs
@@ -15,6 +15,10 @@ use ngit::{
15 15
16mod sub_commands; 16mod sub_commands;
17 17
18fn is_verbose() -> bool {
19 std::env::var("NGIT_VERBOSE").is_ok() || std::env::var("NGIT_TEST").is_ok()
20}
21
18#[tokio::main] 22#[tokio::main]
19async fn main() { 23async fn main() {
20 let cli = Cli::parse(); 24 let cli = Cli::parse();
@@ -25,6 +29,10 @@ async fn main() {
25 std::env::set_var("NGIT_INTERACTIVE_MODE", "1"); 29 std::env::set_var("NGIT_INTERACTIVE_MODE", "1");
26 } 30 }
27 31
32 if cli.verbose || std::env::var("NGIT_TEST").is_ok() {
33 std::env::set_var("NGIT_VERBOSE", "1");
34 }
35
28 if cli.customize { 36 if cli.customize {
29 print!("{CUSTOMISE_TEMPLATE}"); 37 print!("{CUSTOMISE_TEMPLATE}");
30 std::process::exit(0); // Exit the program 38 std::process::exit(0); // Exit the program