From 1554750acc37f00f255b4ec70e0c9b41f7ff8694 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 25 Jan 2022 10:35:33 -0800 Subject: [PATCH] RunCommand: use make_path over mkdir This will make all necessary parent directories a la `mkdir -p`. --- src/lib/Hydra/Plugin/RunCommand.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Plugin/RunCommand.pm b/src/lib/Hydra/Plugin/RunCommand.pm index 93af65dc..eea4d2e1 100644 --- a/src/lib/Hydra/Plugin/RunCommand.pm +++ b/src/lib/Hydra/Plugin/RunCommand.pm @@ -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);