RunCommand: use make_path over mkdir

This will make all necessary parent directories a la `mkdir -p`.
This commit is contained in:
Cole Helbling 2022-01-25 10:35:33 -08:00
parent bf3c46ed43
commit 1554750acc

View file

@ -9,6 +9,7 @@ use Digest::SHA1 qw(sha1_hex);
use Hydra::Model::DB;
use Hydra::Helper::Nix;
use File::Basename qw(dirname);
use File::Path qw(make_path);
use IPC::Run;
sub isEnabled {
@ -172,7 +173,7 @@ sub buildFinished {
# file: 640, dir: 750
umask(0027);
mkdir($dir);
make_path($dir);
open(my $f, '>', $logPath);
umask($oldUmask);