pinokiod 3.3.37 → 3.3.38
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/vs.js +12 -2
- package/package.json +1 -1
package/kernel/bin/vs.js
CHANGED
|
@@ -23,6 +23,11 @@ class VS {
|
|
|
23
23
|
await this.kernel.bin.exec({ sudo: true, message: cmd, }, (stream) => {
|
|
24
24
|
ondata(stream)
|
|
25
25
|
})
|
|
26
|
+
ondata({ raw: `updating...\r\n` })
|
|
27
|
+
const cmd2 = this.cmd("update")
|
|
28
|
+
await this.kernel.bin.exec({ sudo: true, message: cmd2, }, (stream) => {
|
|
29
|
+
ondata(stream)
|
|
30
|
+
})
|
|
26
31
|
ondata({ raw: `Install finished\r\n` })
|
|
27
32
|
return this.kernel.bin.rm(installer, ondata)
|
|
28
33
|
} else {
|
|
@@ -270,8 +275,13 @@ class VS {
|
|
|
270
275
|
const filename = this.kernel.bin.path("vs_buildtools.exe")
|
|
271
276
|
let items = ["Microsoft.VisualStudio.Workload.VCTools"]
|
|
272
277
|
let add = items.map((item) => { return `--add ${item}` }).join(" ")
|
|
273
|
-
|
|
274
|
-
|
|
278
|
+
if (mode === "repair") {
|
|
279
|
+
let cmd = `start /wait ${filename} ${mode} --passive --wait --nocache`
|
|
280
|
+
return cmd
|
|
281
|
+
} else {
|
|
282
|
+
let cmd = `start /wait ${filename} ${mode === 'uninstall' ? mode: ''} --passive --wait --includeRecommended --nocache ${add}`
|
|
283
|
+
return cmd
|
|
284
|
+
}
|
|
275
285
|
}
|
|
276
286
|
}
|
|
277
287
|
module.exports = VS
|