diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 32dea879..220f2bd6 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -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); } diff --git a/src/script/hydra-evaluator b/src/script/hydra-evaluator index 52192c74..3a089e58 100755 --- a/src/script/hydra-evaluator +++ b/src/script/hydra-evaluator @@ -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); }