OSDN Git Service

Command::configdump: tidy output
authorhylom <hylom@users.osdn.me>
Fri, 21 Sep 2018 10:29:08 +0000 (19:29 +0900)
committerhylom <hylom@users.osdn.me>
Fri, 21 Sep 2018 10:29:08 +0000 (19:29 +0900)
src/newslash_web/lib/Newslash/Command/configdump.pm

index 9c0c29a..aa9d677 100644 (file)
@@ -29,6 +29,8 @@ sub run {
     my $conf = $self->app->config;
     my $yaml = Dump($conf);
 
+    $yaml =~ s/^(\S.*:)$/\n$1/gm;
+
     my $path = Mojo::File::path($filename);
     $path->spurt($yaml);
 }