Skip to content
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: instead of moving mill cp and then remove #422

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/mill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ export async function install(): Promise<string> {

const millBin = path.join(binPath, 'mill')

await io.mv(millDownload, millBin)
// We first copy and then remove here to avoid this
// https://stackoverflow.com/questions/44146393/error-exdev-cross-device-link-not-permitted-rename-nodejs
// This idea is taken from https://github.com/shelljs/shelljs/pull/187
// It didn't get merged there, but for our usecase just mimicking this
// should hopefully work fine.
await io.cp(millDownload, millBin)
await io.rmRF(millDownload)

await tc.cacheFile(millBin, 'mill', 'mill', millVersion)
}
Expand Down