1
0
mirror of https://github.com/go-task/task.git synced 2025-11-29 22:48:03 +02:00

Don't persist new checksum on the disk if dry mode is enabled

Fixes #166
This commit is contained in:
Andrey Nering
2019-02-09 10:41:19 -02:00
parent 713ecd35f6
commit 902f0d3ac4
7 changed files with 57 additions and 14 deletions

View File

@@ -181,7 +181,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
}
if !e.Force {
upToDate, err := isTaskUpToDate(ctx, t)
upToDate, err := e.isTaskUpToDate(ctx, t)
if err != nil {
return err
}
@@ -195,7 +195,7 @@ func (e *Executor) RunTask(ctx context.Context, call taskfile.Call) error {
for i := range t.Cmds {
if err := e.runCommand(ctx, t, call, i); err != nil {
if err2 := statusOnError(t); err2 != nil {
if err2 := e.statusOnError(t); err2 != nil {
e.Logger.VerboseErrf("task: error cleaning status on error: %v", err2)
}