Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pipeline): check existence of path before creation (#676)
in the case of windows users using a drive letter only for their paths (`X:\\`) then mkdir will fail for operation not permitted, as you cannot create a drive letter. this will check if the path exists before creation, if so it wont attempt to create it preventing a stack from being thrown. ```node:fs:1373 const result = binding.mkdir( ^ Error: EPERM: operation not permitted, mkdir 'Z:\' at Object.mkdirSync (node:fs:1373:26) at main (file:///C:/Users/Audio.Main/AppData/Roaming/npm/node_modules/cross-seed/dist/pipeline.js:183:8) at async Command.<anonymous> (file:///C:/Users/Audio.Main/AppData/Roaming/npm/node_modules/cross-seed/dist/cmd.js:235:9) at async Command.parseAsync (C:\Users\Audio.Main\AppData\Roaming\npm\node_modules\cross-seed\node_modules\commander\lib\command.js:923:5) at async file:///C:/Users/Audio.Main/AppData/Roaming/npm/node_modules/cross-seed/dist/cmd.js:244:1 { errno: -4048, code: 'EPERM', syscall: 'mkdir', path: 'Z:\\' } ```
- Loading branch information