mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-10-31 07:56:28 +00:00 
			
		
		
		
	do not print anything if no user id was found
This commit is contained in:
		| @@ -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!(); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user