Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

failing to parse toml multi-line string fields that have double quotes inside #163

Open
abom opened this issue Jun 9, 2019 · 2 comments

Comments

@abom
Copy link

abom commented Jun 9, 2019

.startup.toml contains a multu-line field that contains double quoted string inside..

When the container starts, it gives invalid TOML syntax.

Contents of /var/cache/containers/<id>/container.log (thanks @muhamadazmy for pointing me to this!).

Version: development @Revision: 73b9b038f2c549d478adf7b97a1f3a2662c36f7e
2019/06/09 15:26:15 bootstrap D > setting up mounts
2019/06/09 15:26:15 manager D > initializing manager
2019/06/09 15:26:15 main I > Starting process manager
2019/06/09 15:26:15 main I > magic recieved .. continue coreX bootstraping
2019/06/09 15:26:15 bootstrap D > setting up hostname
2019/06/09 15:26:15 bootstrap I > Set hostname to corex
2019/06/09 15:26:15 bootstrap D > linkin mtab
2019/06/09 15:26:15 bootstrap D > startup services
2019/06/09 15:26:15 bootstrap E > failed to load plugins: open /.plugin.toml: no such file or directory
2019/06/09 15:26:15 bootstrap E > failed to startup container services: line 7: invalid TOML syntax

As 0-core uses https://github.com/naoina/toml, i tested it separately, and it gave the same error, while other toml parsers like https://github.com/BurntSushi/toml didn't.

@muhamadazmy
Copy link

muhamadazmy commented Jun 9, 2019 via email

@abom
Copy link
Author

abom commented Jun 9, 2019

Thanks for pointing out these two options, the second one is way better for sure and i will use it, but i think TOML doesn't limit this.

From Multi-line basic strings:

Any Unicode character may be used except those that must be escaped: backslash and the control characters (U+0000 to U+001F, U+007F). Quotation marks need not be escaped unless their presence would create a premature closing delimiter.

A single double quotation is not a premature closing delimiter .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants