Skip to content

Commit 0f3d2c5

Browse files
committed
fix(ci): switch back to lts node
This also tests ipfs/npm-kubo#74 removing the need for hack from #2662
1 parent be18c2e commit 0f3d2c5

File tree

2 files changed

+32
-3
lines changed

2 files changed

+32
-3
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install Node.js
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '18.17.1'
27+
node-version: 'lts/*'
2828

2929
- name: Read ipfs-webui CID from package.json
3030
id: read-webui-version
@@ -87,7 +87,7 @@ jobs:
8787
- name: Install Node.js
8888
uses: actions/setup-node@v4
8989
with:
90-
node-version: '18.17.1'
90+
node-version: 'lts/*'
9191

9292
- name: Read ipfs-webui CID from package.json
9393
id: read-webui-version
@@ -154,7 +154,7 @@ jobs:
154154
- name: Install Node.js
155155
uses: actions/setup-node@v4
156156
with:
157-
node-version: '18.17.1'
157+
node-version: 'lts/*'
158158

159159
- name: Read ipfs-webui CID from package.json
160160
id: read-webui-version

patches/kubo+0.29.0-rc2.patch

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/node_modules/kubo/bin/ipfs b/node_modules/kubo/bin/ipfs
2+
index 70b8f92..4d3c24c 100644
3+
--- a/node_modules/kubo/src/download.js
4+
+++ b/node_modules/kubo/src/download.js
5+
@@ -204,7 +204,23 @@ async function link ({ depBin, version }) {
6+
}
7+
8+
console.info('Linking', depBin, 'to', localBin)
9+
- fs.symlinkSync(depBin, localBin)
10+
+ try {
11+
+ fs.symlinkSync(depBin, localBin)
12+
+ } catch (err) {
13+
+ // Try to recover when creating symlink on modern Windows fails (https://github.com/ipfs/npm-kubo/issues/68)
14+
+ if (isWin && typeof err === 'object' && err !== null && 'code' in err && err.code === 'EPERM') {
15+
+ console.info('Symlink creation failed due to insufficient privileges. Attempting to copy file instead...')
16+
+ try {
17+
+ fs.copyFileSync(depBin, localBin)
18+
+ console.info('Copying', depBin, 'to', localBin)
19+
+ } catch (copyErr) {
20+
+ console.error('File copy also failed:', copyErr)
21+
+ throw copyErr
22+
+ }
23+
+ } else {
24+
+ throw err
25+
+ }
26+
+ }
27+
28+
if (isWin) {
29+
// On Windows, update the shortcut file to use the .exe

0 commit comments

Comments
 (0)