-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When processing data files, Docmaker tries to change the working directory to the project directory. This is done to allow dynamic (js) data files to be able to simply open files (fs.readFile etc.) relative to the project directory.
After processing all data files Docmaker tries to reset the path back to its original setting, but it appears getCwd() does not return a full path but a relative path (e.g. foo instead of /home/<user>/Documents/foo) which makes the call to chdir fail.
✖ error Error: ENOENT: no such file or directory, chdir '/path/to/foo' -> 'foo'
To Reproduce
Steps to reproduce the behavior:
- Run
docmakerwith the configuration below - See error
Expected behavior
It should correctly reset the current directory after loading all data files.
Configuration
docmaker.yaml:
layout: "layout.html"
pages:
- "*.md"
data:
- "data.js"page.md:
# Test
- This is a testlayout.html:
{{ content }}data.js:
return { foo: "bar" };Desktop (please complete the following information)
- OS / version: Ubuntu 20.04
- Docmaker version:
0.1.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working