-
Notifications
You must be signed in to change notification settings - Fork 125
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 the logic #135
Fix the logic #135
Conversation
@hiroyone any idea when this will get reviewed/merged? I'm facing the issue this appears to fix. |
Let's ask the creator. @tnicola |
Thanks for your contribution @hiroyone !It's now merged and published in 0.10.0 |
fs.readdir(resultsPath, (err, files) => { | ||
if (err) console.log(err); | ||
for (const file of files) { | ||
fs.unlink(path.join('path here', file), err => { if (err) console.log(err); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hiroyone - should the string "path here"
have been present here? I'm seeing it surface when I run the tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh it should be a mistake.
Instead of 'path here', resultsPath seems correct, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merged. #149
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @hiroyone for updating it so quickly! I've tested and the error is gone.
fix #56
The cleanResultsPath method should have an empty folder, but the current logic was removing the directory.
The fixed logic cleans up all files in the directory but keep the directory itself.