Skip to content

Commit

Permalink
Don't exit on unknown configuration options
Browse files Browse the repository at this point in the history
  • Loading branch information
kouril committed Nov 13, 2019
1 parent 5cebeab commit c11ae45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pakiti-client
Original file line number Diff line number Diff line change
Expand Up @@ -419,16 +419,18 @@ sub parse ($$) {
next if $line =~ /^\s*\#/;
if ($line =~ /^\s*(\w+)\s*=\s*(.*?)\s*$/) {
($name, $value) = ($1, $2);
die("$Script: unexpected configuration option: $name\n")
unless $spec->{$name};
if (! $spec->{$name}) {
warn("$Script: unexpected configuration option: $name\n");
next;
}
if ($value =~ /^<<(\w+)$/) {
$tag = $1;
$Option{$name} = "";
} else {
$Option{$name} = $value;
}
} else {
die("$Script: unexpected configuration line: $line\n");
warn("$Script: unexpected configuration line: $line\n");
}
}
}
Expand Down

0 comments on commit c11ae45

Please sign in to comment.