Skip to content

fix(taskfile): aws auth check incorrectly returns non-zero#162

Merged
rochecompaan merged 1 commit intomainfrom
rcompaan/fix-establish-aws-login
Mar 3, 2026
Merged

fix(taskfile): aws auth check incorrectly returns non-zero#162
rochecompaan merged 1 commit intomainfrom
rcompaan/fix-establish-aws-login

Conversation

@rochecompaan
Copy link
Contributor

What changed

In Taskfile.yml, replaced:

[ "$EXPIRES_EPOCH" -le "$CURRENT_TIME" ] && NEED_LOGIN=true

with:

if [ "$EXPIRES_EPOCH" -le "$CURRENT_TIME" ]; then
  NEED_LOGIN=true
fi

Why

[ ... ] is a command (test) and returns:

  • 0 when true
  • 1 when false

In the old A && B form, a false comparison returns 1, so the whole line returns non-zero.
Because go-task runs commands in fail-fast mode, that non-zero status caused establish-aws-login to abort, even on normal “not
expired yet” paths.

Result

The expiration check now uses explicit control flow (if), so a false condition is treated as expected logic, not a task failure.
This prevents spurious non-zero exits both locally and in GitHub Actions.

@rochecompaan rochecompaan merged commit a174dc4 into main Mar 3, 2026
2 checks passed
@rochecompaan rochecompaan deleted the rcompaan/fix-establish-aws-login branch March 3, 2026 16:19
getscaf-release-bot bot pushed a commit that referenced this pull request Mar 3, 2026
## [1.13.1](v1.13.0...v1.13.1) (2026-03-03)

### Bug Fixes

* **taskfile:** aws auth check incorrectly returns non-zero ([#162](#162)) ([a174dc4](a174dc4))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants