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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zapier-platform-cli",
3
- "version": "18.1.1",
3
+ "version": "18.2.1",
4
4
  "description": "The CLI for managing integrations in Zapier Developer Platform.",
5
5
  "repository": "zapier/zapier-platform",
6
6
  "homepage": "https://platform.zapier.com/",
@@ -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
- await fsP.symlink(item.linkname, dest);
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 });