diff --git a/task.go b/task.go index 2621ac13..0c24d839 100644 --- a/task.go +++ b/task.go @@ -250,8 +250,7 @@ func (e *Executor) isUpToDateTimestamp(ctx context.Context, call Call) (bool, er if err != nil || generatesMinTime.IsZero() { return false, nil } - - return generatesMinTime.After(sourcesMaxTime), nil + return !generatesMinTime.Before(sourcesMaxTime), nil } func (e *Executor) runCommand(ctx context.Context, call Call, i int) error { diff --git a/testdata/generates/Taskfile.yml b/testdata/generates/Taskfile.yml index 3d5aa2c4..97e20819 100644 --- a/testdata/generates/Taskfile.yml +++ b/testdata/generates/Taskfile.yml @@ -27,8 +27,5 @@ sub/src.txt: cmds: - mkdir -p sub - echo "hello world" > sub/src.txt - # Sleep to avoid time-stamp issue. Some filesystems, E.g. HFS+ for Mac OS, - # only support one second precision on file timestamps. - - sleep 1 status: - test -f sub/src.txt