-
Notifications
You must be signed in to change notification settings - Fork 874
/
Copy pathkubo+0.28.0.patch
57 lines (52 loc) · 1.69 KB
/
kubo+0.28.0.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/node_modules/kubo/src/download.js b/node_modules/kubo/src/download.js
index 0c04e8d..1c90cfe 100644
--- a/node_modules/kubo/src/download.js
+++ b/node_modules/kubo/src/download.js
@@ -236,13 +236,23 @@ async function link ({ depBin, version }) {
return localBin
}
+/**
+ * @param {object} options
+ * @param {string} options.version
+ * @param {string} options.platform
+ * @param {string} options.arch
+ * @param {string} options.installPath
+ * @param {string} options.distUrl
+ */
+module.exports.download = download
+
/**
* @param {string} [version]
* @param {string} [platform]
* @param {string} [arch]
* @param {string} [installPath]
*/
-module.exports = async (version, platform, arch, installPath) => {
+module.exports.downloadAndUpdateBin = async (version, platform, arch, installPath) => {
const args = cleanArguments(version, platform, arch, installPath)
return link({
diff --git a/node_modules/kubo/src/index.js b/node_modules/kubo/src/index.js
index 1ec6f6a..3cece54 100644
--- a/node_modules/kubo/src/index.js
+++ b/node_modules/kubo/src/index.js
@@ -3,6 +3,10 @@
const fs = require('fs')
const path = require('path')
+const { download } = require('./download')
+
+module.exports.download = download
+
module.exports.path = function () {
if (process.env.KUBO_BINARY) {
return process.env.KUBO_BINARY
diff --git a/node_modules/kubo/src/post-install.js b/node_modules/kubo/src/post-install.js
index 0a86c03..acd8ead 100644
--- a/node_modules/kubo/src/post-install.js
+++ b/node_modules/kubo/src/post-install.js
@@ -2,7 +2,7 @@
const download = require('./download')
-download()
+downloadAndUpdateBin()
.catch(err => {
console.error(err)
process.exit(1)