From 2cefd30eff1540e5f2b4eaeadfe8b05b11e7515d Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 4 Jan 2025 10:47:24 +0200 Subject: [PATCH] bootstrap: If dir_is_empty fails, show the non-existent directory path This should help when trying to debug issues. --- src/bootstrap/src/utils/helpers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/src/utils/helpers.rs b/src/bootstrap/src/utils/helpers.rs index 985d733a41f74..0c1a10c27d693 100644 --- a/src/bootstrap/src/utils/helpers.rs +++ b/src/bootstrap/src/utils/helpers.rs @@ -438,7 +438,7 @@ fn lld_flag_no_threads(builder: &Builder<'_>, lld_mode: LldMode, is_windows: boo } pub fn dir_is_empty(dir: &Path) -> bool { - t!(std::fs::read_dir(dir)).next().is_none() + t!(std::fs::read_dir(dir), dir).next().is_none() } /// Extract the beta revision from the full version string.