Skip to content

Conversation

xoxys
Copy link
Member

@xoxys xoxys commented Apr 2, 2025

While repo ls --format flag is deprecated, we added fallback code to not break it. However, the fallback was not working properly as the --format template was evaluated per item in slice while --output is not.

This PR ensures the --format fallback wraps the given template in a range loop.

Now using the format flag is working again:

❯ ../../golang/woodpecker/woodpecker/dist/woodpecker-cli repo ls --format="{{ .FullName }} {{ .Name }}"
11:09PM WRN the --format flag is deprecated, please use --output instead
woodpecker-ci/foo foo
test/repo repo

@xoxys xoxys added bug Something isn't working cli labels Apr 2, 2025
@xoxys xoxys requested a review from a team April 2, 2025 21:11
@woodpecker-bot
Copy link
Contributor

woodpecker-bot commented Apr 2, 2025

Deployment of preview was torn down

@xoxys xoxys merged commit 73de102 into main Apr 3, 2025
6 of 7 checks passed
@xoxys xoxys deleted the fix-format branch April 3, 2025 05:32
This was referenced Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants