Skip to content

Commit

Permalink
Refactor invalid path argument check (#1811)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Jan 1, 2024
1 parent f0d4b19 commit 87925f2
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/justfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 87925f2

Please sign in to comment.