diff options
Diffstat (limited to 'crates/test_utils')
-rw-r--r-- | crates/test_utils/src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/test_utils/src/lib.rs b/crates/test_utils/src/lib.rs index 097a54139..dd582c77c 100644 --- a/crates/test_utils/src/lib.rs +++ b/crates/test_utils/src/lib.rs | |||
@@ -18,7 +18,7 @@ use std::{ | |||
18 | }; | 18 | }; |
19 | 19 | ||
20 | use profile::StopWatch; | 20 | use profile::StopWatch; |
21 | use stdx::lines_with_ends; | 21 | use stdx::{is_ci, lines_with_ends}; |
22 | use text_size::{TextRange, TextSize}; | 22 | use text_size::{TextRange, TextSize}; |
23 | 23 | ||
24 | pub use dissimilar::diff as __diff; | 24 | pub use dissimilar::diff as __diff; |
@@ -376,6 +376,9 @@ pub fn try_ensure_file_contents(file: &Path, contents: &str) -> Result<(), ()> { | |||
376 | "\n\x1b[31;1merror\x1b[0m: {} was not up-to-date, updating\n", | 376 | "\n\x1b[31;1merror\x1b[0m: {} was not up-to-date, updating\n", |
377 | display_path.display() | 377 | display_path.display() |
378 | ); | 378 | ); |
379 | if is_ci() { | ||
380 | eprintln!("\n NOTE: run `cargo test` locally and commit the updated files\n"); | ||
381 | } | ||
379 | if let Some(parent) = file.parent() { | 382 | if let Some(parent) = file.parent() { |
380 | let _ = std::fs::create_dir_all(parent); | 383 | let _ = std::fs::create_dir_all(parent); |
381 | } | 384 | } |