Skip to content

Use del instead of rimraf - #39

Merged
andywer merged 2 commits into
andywer:masterfrom
aminya:use-del
Sep 7, 2020
Merged

Use del instead of rimraf#39
andywer merged 2 commits into
andywer:masterfrom
aminya:use-del

Conversation

@aminya

@aminya aminya commented Sep 7, 2020

Copy link
Copy Markdown
Contributor

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

andywer commented Sep 7, 2020

Copy link
Copy Markdown
Owner

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