agitcms
agitcms copied to clipboard
Allow for the file search to start in the current working directly agitcms is called from
While it is possible to start agitcms outside of the C:\ on Windows. It errors when running on a Disk drive where "/Users/<user/" cannot be resolved to a valid directory.
While this can be worked around by adding this directory to the drive wanted it shouldn't require starting only in the homedir.
See the error below
Error: ENOENT: no such file or directory, scandir '/Users/<user>'
at Object.readdirSync (node:fs:1527:3)
at p (C:\Users\<user>\AppData\Roaming\npm\node_modules\agitcms\dist\main.js:1:490)
at Socket.getFilesAndFolders (C:\Users\<user>\AppData\Roaming\npm\node_modules\agitcms\dist\main.js:1:2360)
at Socket.emit (node:events:517:28)
at Socket.emitUntyped (C:\Users\<user>\AppData\Roaming\npm\node_modules\agitcms\node_modules\socket.io\dist\typed-events.js:69:22)
at C:\Users\<user>\AppData\Roaming\npm\node_modules\agitcms\node_modules\socket.io\dist\socket.js:704:39
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
errno: -4058,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/<user>'
}