pinokiod 8.0.100 → 8.0.101
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/api/hf/index.js +4 -4
- package/package.json +1 -1
package/kernel/api/hf/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const unparse = require('yargs-unparser-custom-flag');
|
|
2
1
|
const Shell = require('../shell')
|
|
3
2
|
const Util = require('../../util')
|
|
4
3
|
const HtmlModal = require('../htmlmodal')
|
|
@@ -329,11 +328,12 @@ class HF {
|
|
|
329
328
|
let params = Object.assign({}, req.params)
|
|
330
329
|
delete params.env
|
|
331
330
|
delete params.path
|
|
332
|
-
|
|
331
|
+
const positional = Array.isArray(params._) ? params._ : (params._ == null ? [] : [params._])
|
|
332
|
+
params._ = ["hf", "download", ...positional]
|
|
333
333
|
let message = [
|
|
334
|
-
|
|
334
|
+
params,
|
|
335
|
+
kernel.platform === "win32" ? "dir" : "ls"
|
|
335
336
|
]
|
|
336
|
-
console.log({ message, before: req.params.message })
|
|
337
337
|
req.params.message = message
|
|
338
338
|
let res = await shell.run(req, ondata, kernel)
|
|
339
339
|
return res
|