insert_doc_files works only from PKM install directory
Same issue as #9 (closed) , but for insert_doc_files.
To reproduce, go in /tmp, create a sample test.md file (eg. with "# Test" inside), then:
/tmp$ insert_doc_files testdb test.md
internal/validators.js:121
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
at validateString (internal/validators.js:121:11)
at Object.resolve (path.js:980:7)
at Object.<anonymous> (/home/gibello/DCR/D1.3/pkm-api/common.js:6:21)
at Module._compile (internal/modules/cjs/loader.js:1118:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)
at Module.load (internal/modules/cjs/loader.js:982:32)
at Function.Module._load (internal/modules/cjs/loader.js:875:14)
at Module.require (internal/modules/cjs/loader.js:1022:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/home/gibello/DCR/D1.3/pkm-api/insert_doc_files.js:6:16) {
code: 'ERR_INVALID_ARG_TYPE'
}
When launched from PKM installation dir (insert_doc_files testdb /tmp/test.md), it works.