mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
do not print anything if no user id was found
This commit is contained in:
parent
f7bb499c28
commit
9e1bba40f7
@ -182,7 +182,7 @@ impl MockAnalytics {
|
|||||||
pub fn new(opt: &Opt) -> &'static Self {
|
pub fn new(opt: &Opt) -> &'static Self {
|
||||||
let user = read_to_string(opt.db_path.join("user-id"))
|
let user = read_to_string(opt.db_path.join("user-id"))
|
||||||
.or_else(|_| read_to_string("/tmp/meilisearch-user-id"))
|
.or_else(|_| read_to_string("/tmp/meilisearch-user-id"))
|
||||||
.unwrap_or_else(|_| "No user-id".to_string());
|
.unwrap_or_else(|_| "".to_string());
|
||||||
let analytics = Box::new(Self { user });
|
let analytics = Box::new(Self { user });
|
||||||
Box::leak(analytics)
|
Box::leak(analytics)
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,11 @@ Anonymous telemetry: \"Enabled\""
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let analytics = analytics.to_string();
|
||||||
|
if analytics != "" {
|
||||||
eprintln!("Unique User ID:\t\"{}\"", analytics);
|
eprintln!("Unique User ID:\t\"{}\"", analytics);
|
||||||
|
}
|
||||||
|
|
||||||
eprintln!();
|
eprintln!();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user