From 30316b6c0b8b66694fa7e52ea59dfa3d255109ae Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 7 Jun 2024 19:16:15 +0200 Subject: [PATCH] chore: remove kubo+0.29.0-rc2.patch if this still passes on github, means they set development mode on their images, which allows for making symlinks without admin on windows-latest --- patches/kubo+0.29.0-rc2.patch | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 patches/kubo+0.29.0-rc2.patch diff --git a/patches/kubo+0.29.0-rc2.patch b/patches/kubo+0.29.0-rc2.patch deleted file mode 100644 index 55cbdb273..000000000 --- a/patches/kubo+0.29.0-rc2.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/node_modules/kubo/bin/ipfs b/node_modules/kubo/bin/ipfs -index 70b8f92..4d3c24c 100644 ---- a/node_modules/kubo/src/download.js -+++ b/node_modules/kubo/src/download.js -@@ -204,7 +204,23 @@ async function link ({ depBin, version }) { - } - - console.info('Linking', depBin, 'to', localBin) -- fs.symlinkSync(depBin, localBin) -+ try { -+ fs.symlinkSync(depBin, localBin) -+ } catch (err) { -+ // Try to recover when creating symlink on modern Windows fails (https://github.com/ipfs/npm-kubo/issues/68) -+ if (isWin && typeof err === 'object' && err !== null && 'code' in err && err.code === 'EPERM') { -+ console.info('Symlink creation failed due to insufficient privileges. Attempting to copy file instead...') -+ try { -+ fs.copyFileSync(depBin, localBin) -+ console.info('Copying', depBin, 'to', localBin) -+ } catch (copyErr) { -+ console.error('File copy also failed:', copyErr) -+ throw copyErr -+ } -+ } else { -+ throw err -+ } -+ } - - if (isWin) { - // On Windows, update the shortcut file to use the .exe