zapier-platform-cli 18.1.1 → 18.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/decompress.js +14 -1
package/package.json
CHANGED
package/src/utils/decompress.js
CHANGED
|
@@ -79,7 +79,20 @@ const extractItem = async (item, realOutputPath) => {
|
|
|
79
79
|
// symlink on Windows requires Administrator privilege. But that's fine
|
|
80
80
|
// because we only run decompress on Windows in CI tests, which do run
|
|
81
81
|
// with Administrator privilege.
|
|
82
|
-
|
|
82
|
+
try {
|
|
83
|
+
await fsP.symlink(item.linkname, dest);
|
|
84
|
+
} catch (err) {
|
|
85
|
+
// When a package manager uses symlinks (e.g. pnpm), the zip may
|
|
86
|
+
// contain both file entries and a symlink entry for the same path.
|
|
87
|
+
// Since we extract in parallel, the file entries can create a
|
|
88
|
+
// directory at `dest` before the symlink is created, causing
|
|
89
|
+
// EEXIST.
|
|
90
|
+
if (err.code === 'EEXIST' && err.syscall === 'symlink') {
|
|
91
|
+
// Safe to ignore this error, the content is already there.
|
|
92
|
+
} else {
|
|
93
|
+
throw err;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
83
96
|
}
|
|
84
97
|
} else {
|
|
85
98
|
await fsP.writeFile(dest, item.data, { mode });
|