mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 03:55:07 +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 {
|
||||
let user = read_to_string(opt.db_path.join("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 });
|
||||
Box::leak(analytics)
|
||||
}
|
||||
|
@ -126,7 +126,11 @@ Anonymous telemetry: \"Enabled\""
|
||||
);
|
||||
}
|
||||
}
|
||||
eprintln!("Unique User ID:\t\"{}\"", analytics);
|
||||
|
||||
let analytics = analytics.to_string();
|
||||
if analytics != "" {
|
||||
eprintln!("Unique User ID:\t\"{}\"", analytics);
|
||||
}
|
||||
|
||||
eprintln!();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user