Closed svenbs closed 2 years ago
@svenbs Could you please share your system details, like OS, node, npm/yarn, git versions where you faced these issues? I am trying to replicate this but seems to be working on my system.
The issue appears to be with fs-extra
npm package.
const fs = require('fs-extra');
// ...
await fs.remove(config.localDir);
It appears that there is a known issue (https://github.com/jprichardson/node-fs-extra/issues/575) related to non utf8 characters in files names for linux platforms.
To gauge how important this is, I'd like to know:
And if the answer is yes to both then we need to look if there's any other solution for removing directories with such contents.
I'm seeing this issue more frequently in the app. Wondering if rimraf
handles it better
When attempting to test one such repo locally, I found that git failed to clone it to my mac. So perhaps you need a Linux fs to start with.
Example repo/file: https://github.com/moul/jquery-rocket/tree/master/rocket-3d/img
I'd like to take this one.
My plan for fixing this issue:
lib/workers/repository/index.ts
:This block deletes the repo directory after repo was processed. I think I need to replace the call to deleteLocalFile()
with rimraf()
: https://www.npmjs.com/package/rimraf From the docs it looks like rimraf
works on any OS, so I'd just call it without any OS checks.
Could you please tell me if that look like a good plan?
Can you reproduce the problem?
Hi @rarkins I tried to reproduce on this repo: https://github.com/olegkrivtsov/renovate-special-chars
I created several test files with special chars and tried to run Renovate in Linux Ubuntu 20.04 with {enabled: true}
and {enabled:false}
. But it worked as expected, I see no errors.
What OS should I use for reproducing? I guess Linux?
Let's close until we can get a working reproduction
What Renovate type are you using? Renovate CLI
Describe the bug If a repo contains files with special encoded characters, the cleanupRepository() or remove() calls will fail with ENOTEMPTY error, as it could not delete the files with special characters in it.
e.g some file like this: ''$'\334''dokument_V1.3_Java7.doc'
Did you see anything helpful in debug logs?
To Reproduce Steps to reproduce the behavior:
touch '''$'\334''testfile''
{ "enabled": false }
in the renovate.json, so the repo will be skipped and renovate tries to delete it.Expected behavior The repo should get deleted and renovate should move on to the next repo.