You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It took me a lot of time to figure out my git/ssh setup problem.
I was getting fatal: destination path 'C:\Users\mvorisek\AppData\Local\npm-cache\_cacache\tmp\git-cloneQLKQWC/.git' already exists and is not an empty directory error.
retry mechanism which is broken - when the 1st clone (via https) has created the tmp directory, the 2nd clone (via ssh) will fail with the error message above
Expected Behavior
As the retry mechanism seems to be working in properly configured git/ssh setup, I propose to check if the tmp/destination directory is still empty after the 1st try, if not, never retry, and throw the exception from the 1st try.
Steps To Reproduce
You should be able to reproduce with fake git client which will always exit with non-zero code and create some file in the tmp/target directory.
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
It took me a lot of time to figure out my git/ssh setup problem.
I was getting
fatal: destination path 'C:\Users\mvorisek\AppData\Local\npm-cache\_cacache\tmp\git-cloneQLKQWC/.git' already exists and is not an empty directory
error.The error was cause by:
https://github.com/npm/pacote/blob/v15.1.1/lib/git.js#L289
and
https://github.com/npm/pacote/blob/v15.1.1/lib/git.js#L249
retry mechanism which is broken - when the 1st clone (via https) has created the tmp directory, the 2nd clone (via ssh) will fail with the error message above
Expected Behavior
As the retry mechanism seems to be working in properly configured git/ssh setup, I propose to check if the tmp/destination directory is still empty after the 1st try, if not, never retry, and throw the exception from the 1st try.
Steps To Reproduce
You should be able to reproduce with fake git client which will always exit with non-zero code and create some file in the tmp/target directory.
The text was updated successfully, but these errors were encountered: