-
-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Description
On Linux or Windows (not macOS as it throws EILSEQ
on writeFileSync
), do:
mkdir test
cd test
node -p 'fs.writeFileSync(Buffer.from([0x78, 0xf6, 0x6c, 0x78]), "test")'
cd ..
node -p 'require("del").sync("test")' # fails
node -p 'fs.rmdirSync("test", {recursive: true})' # works
Error seems to come from rimraf which I think erronously attempts UTF8 decoding:
Error: ENOTEMPTY: directory not empty, rmdir '/tmp/test'
at Object.rmdirSync (fs.js:865:3)
at rmkidsSync (/tmp/node_modules/rimraf/rimraf.js:349:27)
at rmdirSync (/tmp/node_modules/rimraf/rimraf.js:329:7)
at Function.rimrafSync [as sync] (/tmp/node_modules/rimraf/rimraf.js:301:9)
at /tmp/node_modules/del/index.js:112:11
at Array.map (<anonymous>)
at AsyncFunction.module.exports.sync (/tmp/node_modules/del/index.js:104:29)
Metadata
Metadata
Assignees
Labels
No labels