This repository has been archived on 2026-06-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
helm-gitea/templates
alexandru-marianlita e8dff81392 fix: broken pipe in change-password help probe (#1052)
### Description of the change

This change fixes an intermittent failure in the init password-reset flow caused by the CLI feature probe used to detect `--must-change-password` support.

The current probe uses:
`gitea admin user change-password --help | grep -qF -- '--must-change-password'`

Because `grep -q` exits immediately after the first match, it can close the pipe while gitea is still writing help output. In that case, gitea may return broken pipe.

This is timing-dependent, so it only reproduces sometimes with the same binary.

This PR replaces that check with a form that consumes the full output before exiting, avoiding premature pipe closure.

### Benefits

- Prevents intermittent broken pipe failures during init
- Makes password-reset capability detection deterministic

### Applicable issues

- Fixes #1051

### Additional information

No test update was required for this change.

The fix only adjusts the shell pipeline used in the rendered init script to avoid an intermittent broken pipe during the `--must-change-password` capability check. There are currently no existing Helm or bash unit tests covering this specific command path in the chart, and this change does not alter chart values, rendered resource structure, or template interfaces.

### Checklist

- [x] Bash unittests are added (required when changing anything in `scripts` folder)

Reviewed-on: https://gitea.com/gitea/helm-gitea/pulls/1052
Co-authored-by: alexandru-marianlita <alexandru-marian.lita@spirent.com>
Co-committed-by: alexandru-marianlita <alexandru-marian.lita@spirent.com>
2026-04-02 20:30:56 +00:00
..