aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/mozart/src/main.rs')
-rw-r--r--crates/mozart/src/main.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/mozart/src/main.rs b/crates/mozart/src/main.rs
index 35f8485..701f3ef 100644
--- a/crates/mozart/src/main.rs
+++ b/crates/mozart/src/main.rs
@@ -76,6 +76,19 @@ async fn main() {
return;
};
+ if cli.no_cache {
+ println!("Disabling cache usage");
+ // SAFETY: single-threaded at this point; no other threads have started yet.
+ #[cfg(windows)]
+ unsafe {
+ std::env::set_var("COMPOSER_CACHE_DIR", "nul");
+ }
+ #[cfg(not(windows))]
+ unsafe {
+ std::env::set_var("COMPOSER_CACHE_DIR", "/dev/null");
+ }
+ }
+
init_tracing(cli.profile, cli.verbose, cli.quiet);
match commands::execute(&cli).await {
Ok(()) => {}