Skip to content

Commit

Permalink
NixExprs.pm: encode default.nix as utf-8 to fix missing chars/data. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dtzWill authored and domenkozar committed Apr 1, 2017
1 parent 147ba3c commit 90870f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/Hydra/View/NixExprs.pm
Expand Up @@ -5,6 +5,7 @@ use base qw/Catalyst::View/;
use Hydra::Helper::Nix;
use Archive::Tar;
use IO::Compress::Bzip2 qw(bzip2);
use Encode;


sub escape {
Expand Down Expand Up @@ -93,7 +94,7 @@ EOF

my $tar = Archive::Tar->new;
$tar->add_data("channel/channel-name", ($c->stash->{channelName} or "unnamed-channel"), {mtime => 1});
$tar->add_data("channel/default.nix", $res, {mtime => 1});
$tar->add_data("channel/default.nix", encode('utf8',$res), {mtime => 1});

my $tardata = $tar->write;
my $bzip2data;
Expand Down

0 comments on commit 90870f1

Please sign in to comment.