You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.https://github.com/BlameButton/docmaker/blob/8516b9161278e85c053fd81c10b2f1c5c7428f32/src/data.ts#L45-L46
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 tochdir
fail.https://github.com/BlameButton/docmaker/blob/8516b9161278e85c053fd81c10b2f1c5c7428f32/src/data.ts#L52
To Reproduce
Steps to reproduce the behavior:
docmaker
with the configuration belowExpected behavior
It should correctly reset the current directory after loading all data files.
Configuration
docmaker.yaml
:page.md
:layout.html
:data.js
:Desktop (please complete the following information)
0.1.4
The text was updated successfully, but these errors were encountered: