Commit f59332f
authored
fix: handle cross-device link error in build-standalone-zip task (#195)
## Description
When building the AWS CDK CLI, a .zip file is created in a temporary
directory and moved afterward.
In certain environments, "cross-device link" fails. When the user's
workspace is in a mounted volume, moving of a file fails during the
build step because `fs.rename()` only works when the source and
destination are in the same filesystem.
<img width="669" alt="Screenshot 2025-03-05 at 13 08 20"
src="https://github.com/user-attachments/assets/6f108a34-f358-4f39-ac2e-6f6dbb147e22"
/>
## Solution
Copy the source file to the destination and delete the source file. This
achieves the same result, but prevents us from running into limitations
across filesystems.
## Testing
Ran `yarn build` successfully and all tests pass.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license1 parent c46717c commit f59332f
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
| |||
0 commit comments