Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bin/metabase-profile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ use Metabase::User::Profile;
use Metabase::User::Secret;
use Pod::Usage;
use IO::Prompt::Tiny qw(prompt);
use Encode qw(decode_utf8);

@ARGV = map { decode_utf8($_, 1) } @ARGV;

my ( %profile, $help, $output, $full_name, $email_address, $password );
my $result = GetOptions(
Expand Down Expand Up @@ -65,7 +68,7 @@ my $secret = Metabase::User::Secret->new(
print "Writing profile to '$output'\n";
open my $fh, ">", $output;
print {$fh}
JSON::MaybeXS->new(ascii => 1, pretty => 1)->encode( [ $profile->as_struct, $secret->as_struct, ] );
JSON::MaybeXS->new(ascii => 1, pretty => 1, utf8 => 1)->encode( [ $profile->as_struct, $secret->as_struct, ] );
close $fh;
chmod 0600, $output;

Expand Down