Refactor invalid path argument check (#1811)
This commit is contained in:
parent
f0d4b19557
commit
87925f293e
@ -226,13 +226,9 @@ impl<'src> Justfile<'src> {
|
|||||||
let arena: Arena<Scope> = Arena::new();
|
let arena: Arena<Scope> = Arena::new();
|
||||||
|
|
||||||
while let Some(first) = remaining.first().copied() {
|
while let Some(first) = remaining.first().copied() {
|
||||||
if first.contains("::") {
|
if first.contains("::")
|
||||||
if first.starts_with(':') || first.ends_with(':') || first.contains(":::") {
|
&& !(first.starts_with(':') || first.ends_with(':') || first.contains(":::"))
|
||||||
missing.push(first.to_string());
|
{
|
||||||
remaining = remaining[1..].to_vec();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
remaining = first
|
remaining = first
|
||||||
.split("::")
|
.split("::")
|
||||||
.chain(remaining[1..].iter().copied())
|
.chain(remaining[1..].iter().copied())
|
||||||
|
Loading…
Reference in New Issue
Block a user