node-github-download
node-github-download copied to clipboard
Cannot download to destination on different partition or device (Linux)
On Linux, this package will error out if you attempt to download to a directory on a different partition or device from your working directory.
Here's an example of the error message:
EXDEV: cross-device link not permitted, rename '/home/sniffnoy/truffle/bare/1595361480018-8246913923470209/bare-box-master' -> '/tmp/tmp-27587-bq1OIiU3jrtC/box'
(In this case I was attempting to download to a temporary directory, as you can see.)
The reason for this is that this package works by first downloading to a temporary directory in place, then renaming it to the destination. However, on Linux, renames are not permitted across different devices (such as different partitions). This makes using the package quite difficult.
In addition, the package does not clean up the temporary files it created should the rename fail, for what it's worth.
Thank you!