From d1f643ebd90376c2eb0a7e9a61b7ff54c50cd2ce Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Sat, 26 Aug 2023 18:30:23 -0300 Subject: [PATCH] fix: `--status` flag should not have side-effects (#1313) Closes #1305 Closes #1307 Co-authored-by: Giovanni Visciano --- CHANGELOG.md | 3 +++ cmd/task/task.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e668da22..446518dc6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ - Fix bug in usage of special variables like `{{.USER_WORKING_DIR}}` in combination with `includes` (#1046, #1205, #1250, #1293, #1312, #1274 by @andarto, #1309 by @andreynering). +- Fix bug on `--status` flag. Running this flag should not have side-effects: + it should not update the checksum on `.task`, only report its status (#1305, + #1307 by @visciang, #1313 by @andreynering). ## v3.28.0 - 2023-07-24 diff --git a/cmd/task/task.go b/cmd/task/task.go index 7642533f90..dc70c6c59e 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -221,7 +221,7 @@ func run() error { Silent: flags.silent, AssumeYes: flags.assumeYes, Dir: flags.dir, - Dry: flags.dry, + Dry: flags.dry || flags.status, Entrypoint: flags.entrypoint, Summary: flags.summary, Parallel: flags.parallel,