pinokiod 3.288.0 → 3.289.0
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/kernel/plugin.js +10 -0
- package/package.json +1 -1
package/kernel/plugin.js
CHANGED
|
@@ -43,11 +43,13 @@ class Plugin {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
async init() {
|
|
46
|
+
console.log("Plugin init")
|
|
46
47
|
let exists = await this.kernel.exists("plugin")
|
|
47
48
|
if (!exists) {
|
|
48
49
|
await fs.promises.mkdir(this.kernel.path("plugin"), { recursive: true }).catch((e) => {})
|
|
49
50
|
}
|
|
50
51
|
let code_exists = await this.kernel.exists("plugin/code")
|
|
52
|
+
console.log({ code_exists })
|
|
51
53
|
if (!code_exists) {
|
|
52
54
|
if (this.kernel.bin.installed && this.kernel.bin.installed.conda && this.kernel.bin.installed.conda.has("git")) {
|
|
53
55
|
await this.kernel.exec({
|
|
@@ -62,6 +64,14 @@ class Plugin {
|
|
|
62
64
|
return
|
|
63
65
|
}
|
|
64
66
|
} else {
|
|
67
|
+
if (this.kernel.bin.installed && this.kernel.bin.installed.conda && this.kernel.bin.installed.conda.has("git")) {
|
|
68
|
+
await this.kernel.exec({
|
|
69
|
+
message: "git pull",
|
|
70
|
+
path: this.kernel.path("plugin/code")
|
|
71
|
+
}, (e) => {
|
|
72
|
+
process.stdout.write(e.raw)
|
|
73
|
+
})
|
|
74
|
+
}
|
|
65
75
|
await this.setConfig()
|
|
66
76
|
}
|
|
67
77
|
}
|