Skip to content

Conversation

@zhming0
Copy link
Contributor

@zhming0 zhming0 commented Oct 13, 2025

Description

Fix a long standing bug in artifact search command that this never worked

buildkite-agent artifact search "..." -format "%p\n"

The output would be:

artifact-1\nartifact-2

instead of:

artifact-1
artifact-2

It hasn't been an issue because our default format is hardcoded in golang using string literal: %j %p %c\n, so the \n is parsed and correctly registered as escape sequence by the compiler.

This PR fixes all that by using strconv.Unquote.

Context

PS-1245

Testing

  • Tests have run locally (with go test ./...). Buildkite employees may check this if the pipeline has run automatically.
  • Code is formatted (with go fmt ./...)

Disclosures / Credits

Peasant hand written

@zhming0 zhming0 requested review from a team and DrJosh9000 October 13, 2025 05:06
Copy link
Contributor

@DrJosh9000 DrJosh9000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zhming0 zhming0 enabled auto-merge October 14, 2025 03:37
@zhming0 zhming0 merged commit f01a0e3 into main Oct 14, 2025
1 check passed
@zhming0 zhming0 deleted the ming/ps-1245 branch October 14, 2025 04:23
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.

3 participants