diff options
author | Casey Rodarmor <casey@rodarmor.com> | 2023-12-31 16:15:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-01 00:15:41 +0000 |
commit | 87925f293eab494ae6c5d310004c32529f2b5685 (patch) | |
tree | d0b3b52e70f7b015ffbd976d1371812a156bb74e | |
parent | f0d4b19557b6debd4e104034efe60bc863b55813 (diff) |
Refactor invalid path argument check (#1811)
-rw-r--r-- | src/justfile.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/justfile.rs b/src/justfile.rs index 8bec2956..031b6679 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -226,13 +226,9 @@ impl<'src> Justfile<'src> { let arena: Arena<Scope> = Arena::new(); while let Some(first) = remaining.first().copied() { - if first.contains("::") { - if first.starts_with(':') || first.ends_with(':') || first.contains(":::") { - missing.push(first.to_string()); - remaining = remaining[1..].to_vec(); - continue; - } - + if first.contains("::") + && !(first.starts_with(':') || first.ends_with(':') || first.contains(":::")) + { remaining = first .split("::") .chain(remaining[1..].iter().copied()) |