From 95a597eb8236c5ab180ac38284a655533f83e715 Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Tue, 23 Sep 2025 15:26:06 +0200 Subject: [PATCH] Fix workspace detection with windows line endings Some cargo workspaces may contain windows line endings. Even if the file is stored in a repo with unix line endings, users may have some setting activated that automatically translates them to windows line endings when working locally. --- src/init.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.rs b/src/init.rs index 68011ed4..16ea35e8 100644 --- a/src/init.rs +++ b/src/init.rs @@ -74,7 +74,7 @@ pub fn init() -> Result<()> { let workspace_manifest_content = fs::read_to_string(&workspace_manifest) .with_context(|| format!("Failed to read the file {}", workspace_manifest.display()))?; - if !workspace_manifest_content.contains("[workspace]\n") + if !workspace_manifest_content.contains("[workspace]") && !workspace_manifest_content.contains("workspace.") { bail!(