mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-06 18:13:29 +02:00
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.
This commit is contained in:
+1
-1
@@ -74,7 +74,7 @@ pub fn init() -> Result<()> {
|
|||||||
|
|
||||||
let workspace_manifest_content = fs::read_to_string(&workspace_manifest)
|
let workspace_manifest_content = fs::read_to_string(&workspace_manifest)
|
||||||
.with_context(|| format!("Failed to read the file {}", workspace_manifest.display()))?;
|
.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.")
|
&& !workspace_manifest_content.contains("workspace.")
|
||||||
{
|
{
|
||||||
bail!(
|
bail!(
|
||||||
|
|||||||
Reference in New Issue
Block a user