pinokiod 3.19.73 → 3.19.74
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/bin/cli.js +5 -5
- package/package.json +1 -1
package/kernel/bin/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
2
|
const Util = require('../util')
|
|
3
3
|
class CLI {
|
|
4
|
-
version = "0.0.
|
|
4
|
+
version = "0.0.9"
|
|
5
5
|
async install(req, ondata) {
|
|
6
6
|
await this.kernel.exec({
|
|
7
7
|
message: "npm install -g pterm@latest --force",
|
|
@@ -13,18 +13,18 @@ class CLI {
|
|
|
13
13
|
let exists
|
|
14
14
|
console.log("platform", this.kernel.platform)
|
|
15
15
|
if (this.kernel.platform === "win32") {
|
|
16
|
-
exists = await Util.exists(this.kernel.path("bin/npm/
|
|
16
|
+
exists = await Util.exists(this.kernel.path("bin/npm/pterm"))
|
|
17
17
|
console.log("Exists", exists)
|
|
18
18
|
} else {
|
|
19
|
-
exists = await Util.exists(this.kernel.path("bin/npm/bin/
|
|
19
|
+
exists = await Util.exists(this.kernel.path("bin/npm/bin/pterm"))
|
|
20
20
|
console.log("Exists", exists)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
if (exists) {
|
|
24
|
-
let p = this.kernel.which("
|
|
24
|
+
let p = this.kernel.which("pterm")
|
|
25
25
|
if (p) {
|
|
26
26
|
let res = await this.kernel.exec({
|
|
27
|
-
message: "
|
|
27
|
+
message: "pterm version terminal"
|
|
28
28
|
}, ondata)
|
|
29
29
|
let re = new RegExp(`.*pterm@${this.version}.*`)
|
|
30
30
|
if (res.stdout && re.test(res.stdout)) {
|