Quote a string setting that YAML would read as a number (closes #229)
check / check (push) Waiting to run
check / check (push) Waiting to run
config set wrote every value as an unquoted YAML scalar, and config.Load reads the file through untyped YAML, so an access key 00112233 loaded as 38043 and a hostname 007 as 7. config set now looks the key up in config.Config by the fields' yaml tags. A string setting is tagged !!str, which the encoder quotes wherever YAML would read a number or a boolean. Other settings stay unquoted, so compression_level 9 is still a number. A value that is not valid UTF-8 stays untagged and is written as !!binary, which loads back unchanged. Judgement call: the type comes from reflection over config.Config. Model: opus-5-5
This commit was merged in pull request #260.
This commit is contained in:
@@ -22,6 +22,14 @@ the tag exists and is exercised; what is left is merging `next` to
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-07: Made `config set` keep a string that looks like a number
|
||||
([issue #229](https://git.eeqj.de/sneak/vaultik/issues/229)). It wrote
|
||||
every value unquoted, and `config.Load` reads the file through untyped
|
||||
YAML, so an access key `00112233` loaded as `38043` and a hostname `007`
|
||||
as `7`. A value for a string setting in `config.Config` is now tagged as
|
||||
a YAML string, which the file quotes wherever YAML would read a number or
|
||||
a boolean; other settings are still written unquoted.
|
||||
|
||||
- 2026-10-07: Made a backup notice a file rewritten with its size
|
||||
unchanged and a new mtime in the same second as the one in the index
|
||||
([issue #226](https://git.eeqj.de/sneak/vaultik/issues/226)). The
|
||||
|
||||
Reference in New Issue
Block a user