Closed tessus closed 1 day ago
Could you share (a potentially redacted) version of your YAML file here, or if you're not comfortable sharing publicly, email it to me?
@tessus My guess is that your file looks like this:
- link:
~/.bashrc: bash/bashrc.sh
This is valid YAML because YAML defaults to null
when a key has no value:
[
{
"link": None,
"~/.bashrc": "bash/bashrc.sh"
}
]
However, this is not well-formed because it doesn't parse to dotbot's required format.
If your file looks like the above, please close this issue because it's not a dotbot problem.
For reference, this is correct syntax using 2-space indentation:
- link:
~/.bashrc: bash/bashrc.sh
and this is the correct syntax using 4-space indentation:
- link:
~/.bashrc: bash/bashrc.sh
which parses to:
[
{
"link": {"~/.bashrc": "bash/bashrc.sh"}
}
]
Yes, my file looks like that. Why? Because 2 spaces are used for indentation. ;-)
But thank you. Your explanation makes sense. Now I only have to figure out how I explain this to every editor that uses .editorconfig
with
[*.yaml]
indent_style = space
indent_size = 2
Super! Please close this issue.
I still think this is a dotbot issue. Ansible parses files with 2 spaces just fine.
I've just found out that I get the following errors, if the
install.conf.yaml
uses 2 spaces for indentation rather than 4.I thought the config yaml file has to be a valid yaml file, but apparently this is not the case.
It specifically requires an indentation with 4 spaces. @anishathalye can you please shed some light on this? According to every yaml validator my config file is valid, but
install
abends with the above messages. All is well again, when I change to 4 spaces.