pinokiod 3.8.49 → 3.8.51
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/index.js +19 -11
- package/package.json +1 -1
package/kernel/bin/index.js
CHANGED
|
@@ -323,18 +323,23 @@ class Bin {
|
|
|
323
323
|
} else {
|
|
324
324
|
site_packages_path = path.resolve(this.kernel.homedir, "bin/miniconda/lib/python3.10/site-packages")
|
|
325
325
|
}
|
|
326
|
-
// check if any of 'uvicorn', 'importlib_metadata', 'fastapi' exists
|
|
327
|
-
let module_paths = ["fastapi", "uvicorn", "importlib_metadata"].map((name) => {
|
|
328
|
-
return path.resolve(site_packages_path, name)
|
|
329
|
-
})
|
|
326
|
+
// // check if any of 'uvicorn', 'importlib_metadata', 'fastapi' exists
|
|
327
|
+
// let module_paths = ["fastapi", "uvicorn", "importlib_metadata"].map((name) => {
|
|
328
|
+
// return path.resolve(site_packages_path, name)
|
|
329
|
+
// })
|
|
330
|
+
// let to_reset_exists = false
|
|
331
|
+
// for(let module_path of module_paths) {
|
|
332
|
+
// let e = await this.kernel.exists(module_path)
|
|
333
|
+
// console.log("checking kernel exists", { module_path, e })
|
|
334
|
+
// if (e) {
|
|
335
|
+
// to_reset_exists = true
|
|
336
|
+
// break;
|
|
337
|
+
// }
|
|
338
|
+
// }
|
|
339
|
+
// console.log("> to_reset_exists", to_reset_exists)
|
|
340
|
+
|
|
330
341
|
let to_reset_exists = false
|
|
331
|
-
|
|
332
|
-
let e = await this.kernel.exists(module_path)
|
|
333
|
-
if (e) {
|
|
334
|
-
to_reset_exists = true
|
|
335
|
-
break;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
342
|
+
|
|
338
343
|
if (to_reset_exists) {
|
|
339
344
|
this.correct_conda = false
|
|
340
345
|
} else {
|
|
@@ -342,9 +347,12 @@ class Bin {
|
|
|
342
347
|
// process.stdout.write(stream.raw)
|
|
343
348
|
// console.log("conda list check", { stream })
|
|
344
349
|
})
|
|
350
|
+
console.log("> res", res)
|
|
345
351
|
|
|
346
352
|
let lines = res.response.split(/[\r\n]+/)
|
|
353
|
+
console.log("> lines", lines)
|
|
347
354
|
for(let line of lines) {
|
|
355
|
+
console.log("> start", start)
|
|
348
356
|
if (start) {
|
|
349
357
|
let chunks = line.split(/\s+/).filter(x => x)
|
|
350
358
|
if (chunks.length > 2) {
|