Skip to content

Use del instead of rimraf #39

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

Merged
merged 2 commits into from
Sep 7, 2020
Merged

Use del instead of rimraf #39

merged 2 commits into from
Sep 7, 2020

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Sep 7, 2020

This uses del instead of rimraf. rimraf does not delete a directory when it is not empty. This should fix the error.

This is an error I get when I try to update threadjs.
andywer/threads.js#300

> puppet-run --plugin=mocha --bundle=./test/workers/:/workers/ --serve=./bundle/worker.js:/worker.js ./test/*.chromium*.ts

√ Bundling done.
Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\aminy\AppData\Local\Temp\puppet-run-cache4rxzKE'
    at Object.rmdirSync (fs.js:872:3)
    at rmkidsSync (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\node_modules\rimraf\rimraf.js:364:25)
    at rmdirSync (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\node_modules\rimraf\rimraf.js:342:7)
    at Function.rimrafSync [as sync] (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\node_modules\rimraf\rimraf.js:312:9)
    at Object.clearTemporaryFileCache (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\dist\temporary.js:35:22)
    at C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\dist\cli.js:213:37
    at step (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\dist\cli.js:34:23)
    at Object.throw (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\dist\cli.js:15:53)
    at rejected (C:\Users\aminy\Documents\GitHub\JavaScript\threads.js\node_modules\puppet-run\dist\cli.js:7:65)
    at runMicrotasks (<anonymous>) {
  errno: -4051,
  syscall: 'rmdir',
  code: 'ENOTEMPTY',
  path: 'C:\\Users\\aminy\\AppData\\Local\\Temp\\puppet-run-cache4rxzKE'

@aminya aminya marked this pull request as draft September 7, 2020 14:19
@aminya aminya marked this pull request as ready for review September 7, 2020 14:25
@andywer
Copy link
Owner

andywer commented Sep 7, 2020

Didn't know that. Thanks!

@andywer andywer merged commit 01404fb into andywer:master Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants