Handle UTF-8 characters in eval error messages
This commit is contained in:
parent
a8db329839
commit
e1c9e28589
|
@ -2,6 +2,7 @@ package Hydra::Helper::AddBuilds;
|
|||
|
||||
use strict;
|
||||
use feature 'switch';
|
||||
use utf8;
|
||||
use XML::Simple;
|
||||
use IPC::Run;
|
||||
use Nix::Store;
|
||||
|
@ -291,6 +292,9 @@ sub evalJobs {
|
|||
}
|
||||
}
|
||||
|
||||
# Handle utf-8 characters in error messages. No idea why this works.
|
||||
utf8::decode($_->{msg}) foreach @{$jobs->{error}};
|
||||
|
||||
return ($jobs, $nixExprInput, $errors);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
use strict;
|
||||
use feature 'switch';
|
||||
use utf8;
|
||||
use Hydra::Schema;
|
||||
use Hydra::Plugin;
|
||||
use Hydra::Helper::Nix;
|
||||
|
@ -250,7 +251,9 @@ sub checkJobsetWrapped {
|
|||
default { $bindings .= "..."; }
|
||||
}
|
||||
}
|
||||
$msg .= "at `" . $error->{location} . "' [$bindings]:\n" . $error->{msg} . "\n\n";
|
||||
$msg .=
|
||||
($error->{location} ne "" ? "in job ‘$error->{location}’" : "at top-level") .
|
||||
" [$bindings]:\n" . $error->{msg} . "\n\n";
|
||||
}
|
||||
setJobsetError($jobset, $msg);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue