Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pipeline): check existence of path before creation #676

Merged
merged 1 commit into from
May 9, 2024

Conversation

zakkarry
Copy link
Collaborator

@zakkarry zakkarry commented May 9, 2024

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.

  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:\\'
}

@zakkarry zakkarry self-assigned this May 9, 2024
@zakkarry zakkarry added bug Something isn't working config related to config file labels May 9, 2024
@zakkarry zakkarry merged commit cbe601e into master May 9, 2024
5 checks passed
@zakkarry zakkarry deleted the checkexist-before-mkdir branch May 9, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working config related to config file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants