Fix failure on convert in modern Node.js

Closes #30.
This commit is contained in:
Evan Young 2022-01-22 13:39:12 -05:00 committed by GitHub
commit 12394da334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,7 @@ if (argv._.includes("download")) {
if (argv._.includes("convert")) {
commands.push(() => {
return fs.rmdir(chaptersPath, { recursive: true, maxRetries: 3 })
return fs.rm(chaptersPath, { force: true, recursive: true, maxRetries: 3 })
.then(() => fs.mkdir(chaptersPath, { recursive: true }))
.then(() => convert(cachePath, manifestPath, chaptersPath, argv.book, argv.jobs));
});