Skip to content

Commit

Permalink
Make ./var/log when needed so that it isn't in git
Browse files Browse the repository at this point in the history
Then we can have puppet create a symlink without dirtying the working dir.
  • Loading branch information
rwstauner committed Jul 20, 2014
1 parent 8b1da82 commit a708da4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 10 additions & 1 deletion lib/MetaCPAN/Script/Runner.pm
Expand Up @@ -5,6 +5,7 @@ use warnings;

use Config::JFDI;
use FindBin;
use File::Path ();
use Hash::Merge::Simple qw(merge);
use IO::Interactive qw(is_interactive);
use Module::Pluggable search_path => ['MetaCPAN::Script'];
Expand All @@ -19,7 +20,15 @@ sub run {
Module::Runtime::require_module( $plugins{$class} );

my $config = build_config();
my $obj = $plugins{$class}->new_with_options($config);

foreach my $logger ( @{ $config->{logger} || [] } ) {
my $path = $logger->{filename} or next;
$path =~ s{([^/]+)$}{};
-d $path
or File::Path::mkpath($path);
}

my $obj = $plugins{$class}->new_with_options($config);
$obj->run;
}

Expand Down
1 change: 0 additions & 1 deletion var/log/README

This file was deleted.

0 comments on commit a708da4

Please sign in to comment.