pinokiod 1.0.6 → 1.0.7
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/server/public/install.js +14 -1
package/package.json
CHANGED
package/server/public/install.js
CHANGED
|
@@ -38,20 +38,33 @@ const installname = async (url, name) => {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
const install = async (name, url, term, socket, options) => {
|
|
41
|
+
console.log("options", options)
|
|
41
42
|
const n = new N()
|
|
42
43
|
await new Promise((resolve, reject) => {
|
|
43
44
|
socket.close()
|
|
44
45
|
|
|
45
46
|
// normalize git url to the standard .git format
|
|
47
|
+
let branch
|
|
48
|
+
if (options && options.branch) {
|
|
49
|
+
branch = options.branch
|
|
50
|
+
}
|
|
46
51
|
|
|
47
52
|
if (!url.endsWith(".git")) {
|
|
48
53
|
url = url + ".git"
|
|
49
54
|
}
|
|
50
55
|
|
|
56
|
+
console.log({ url , branch })
|
|
57
|
+
let cmd
|
|
58
|
+
if (branch) {
|
|
59
|
+
cmd = `git clone -b ${branch} ${url} ${name}`
|
|
60
|
+
} else {
|
|
61
|
+
cmd = `git clone ${url} ${name}`
|
|
62
|
+
}
|
|
63
|
+
debugger
|
|
51
64
|
socket.run({
|
|
52
65
|
method: "shell.run",
|
|
53
66
|
params: {
|
|
54
|
-
message:
|
|
67
|
+
message: cmd,
|
|
55
68
|
path: "~/api"
|
|
56
69
|
}
|
|
57
70
|
}, (packet) => {
|