From: Sergey Matveev Date: Tue, 15 Dec 2020 12:17:48 +0000 (+0300) Subject: Explicitly remove possibly existed but now empty target result X-Git-Tag: v0.6.0~4 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=8d5585b7ef0cd458d9e005abdf5ce7fb2f0c5e47 Explicitly remove possibly existed but now empty target result --- diff --git a/run.go b/run.go index 824f6c2..512418b 100644 --- a/run.go +++ b/run.go @@ -507,6 +507,7 @@ func runScript(tgtOrig string, errs chan error, traced bool) error { // Do we need to ifcreate it, of ifchange with renaming? if fd == nil { + os.Remove(path.Join(cwdOrig, tgt)) err = ifcreate(fdDep, tgt) if err != nil { goto Finish