diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c16de4..58aac98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Running concurrently `psu` commands should work now, by creating unique temporary file names +- Fix `psu tasks:healthy` action output, when an error occurs ## [1.2.0] - 2021-09-14 ### Added diff --git a/psu b/psu index d6e535b..724929b 100755 --- a/psu +++ b/psu @@ -1234,9 +1234,15 @@ tasks() { tasks_healthy() { local tasks_running tasks_running=$(tasks 'running' 'running') + if [ $? -ne 0 ]; then + exit 0 + fi local tasks_job_complete tasks_job_complete=$(tasks 'shutdown' 'complete') - echo "$(echo "${tasks_running}${tasks_job_complete}" | jq -sjc 'add | unique_by(.ID)')" + if [ $? -ne 0 ]; then + exit 0 + fi + echo "${tasks_running}${tasks_job_complete}" | jq -sjc 'add | unique_by(.ID)' } services() {