exocortex
exocortex copied to clipboard
Windows paths are not escaped correctly
Windows paths use \
as the separator. When Exocortex writes its config file, it doesn't properly escape those slashes, meaning that when the config gets parsed each separator is interpreted as an attempt at writing an escape character, which always results in a fatal error.
C:\Users\Ryan > exo new test
• Creating your new wiki: test
• Successfully created your wiki: cd C:\Users\Ryan\test && exo start
C:\Users\Ryan > cd test && exo start
⨯ exo: Config file required to start wiki: While parsing config: invalid character 'U' in string escape code
Whoops! Thanks for filing, I'll get a fix in soon
Hmmm seems like I'm using filepath.Join in most places... @ryantriangles is it just failing to create the exocortex.json
file in your test
dir? If it did create one can you paste me the contents?
I have the same issue, no problems creating the exocortext.json
file. Exact same error message.
Exo starts if I edit the json file to escape the paths manually.
Could either of you paste me your .json
file? So sounds like it's the repository
field that is incorrect?
It successfully creates one, it's just writing a Windows path as-is. The error is helpfully highlighted by GitHub's JSON highlighting.
{
"server": {
"host": "localhost",
"port": 1234
},
"repository": "D:\temp\hello",
"syncInterval": 30,
"title": "My Wiki",
"remote": "origin",
"branch": "master"
}
#18 is intended to fix this issue.