mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Don't die when config has unknown options. #108
This commit is contained in:
parent
c957c27367
commit
0ebd8eb8a9
2 changed files with 12 additions and 6 deletions
|
@ -315,8 +315,9 @@ sub load {
|
|||
my $key = $1;
|
||||
if (!exists $Options->{$key}) {
|
||||
$key = +(grep { $Options->{$_}{aliases} && grep $_ eq $key, @{$Options->{$_}{aliases}} }
|
||||
keys %$Options)[0] or die "Unknown option $1 at line $.\n";
|
||||
keys %$Options)[0] or warn "Unknown option $1 at line $.\n";
|
||||
}
|
||||
next unless $key;
|
||||
my $opt = $Options->{$key};
|
||||
set($key, $opt->{deserialize} ? $opt->{deserialize}->($2) : $2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue