mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-16 12:53:42 +00:00
fix(deps): bump go-yaml to fix block and folded scalar round-trips (#1321)
Bumps go-yaml to its main branch and drops the workaround it makes obsolete, matching https://github.com/go-gitea/gitea/pull/39787. - go-yaml main keeps block scalar indentation indicators (https://github.com/yaml/go-yaml/pull/414), so values with a leading newline no longer need quoting - `config edit` no longer wraps lines, because go-yaml still wraps more-indented lines of folded scalars and turns a space into a newline Reviewed-on: https://gitea.com/gitea/runner/pulls/1321 Reviewed-by: bircni <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
0d84ec6dab
commit
b9aa47d1a5
4 files changed
+11
-25
No files matched your search
@@ -280,6 +280,12 @@ func TestEditValuesPreservesFileText(t *testing.T) {
|
||||
edit: func(file string) error { return SetValue(file, "runner.capacity", "4") },
|
||||
added: "runner:\n capacity: 4\n",
|
||||
},
|
||||
{
|
||||
name: "folded scalar with a long more-indented line",
|
||||
content: []byte("runner:\n envs:\n FOLDED: >\n begin\n a more-indented line that is long enough for an encoder wrapping at 80 columns to break\n end\n"),
|
||||
edit: func(file string) error { return SetValue(file, "runner.capacity", "4") },
|
||||
added: " capacity: 4\n",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
|
||||
Reference in new issue
Block a user