Skip to content

Commit 95a597e

Browse files
committed
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.
1 parent 2af9e89 commit 95a597e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn init() -> Result<()> {
7474

7575
let workspace_manifest_content = fs::read_to_string(&workspace_manifest)
7676
.with_context(|| format!("Failed to read the file {}", workspace_manifest.display()))?;
77-
if !workspace_manifest_content.contains("[workspace]\n")
77+
if !workspace_manifest_content.contains("[workspace]")
7878
&& !workspace_manifest_content.contains("workspace.")
7979
{
8080
bail!(

0 commit comments

Comments
 (0)