From a40b70f718b93de75655ae6f6b9edaed338b72e5 Mon Sep 17 00:00:00 2001 From: Mitsutoshi Aoe Date: Tue, 18 Jun 2019 15:35:20 +0900 Subject: [PATCH] Fix Directory nonexistent issue Repro code is available at https://github.com/maoe/minimal-do-repro --- minimal/do | 1 + 1 file changed, 1 insertion(+) diff --git a/minimal/do b/minimal/do index 258a25e..cde88ad 100755 --- a/minimal/do +++ b/minimal/do @@ -382,6 +382,7 @@ _do() echo "$PWD/$target" >>"$DO_BUILT" if [ ! -e "$tmp" ]; then # if $3 wasn't created, copy from stdout file + mkdir -p "$(qdirname "$tmp")" cat <&4 >$tmp # if that's zero length too, forget it [ -s "$tmp" ] || rm -f "$tmp"