pinokiod 0.1.19 → 0.1.21
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/package.json +1 -1
- package/server/index.js +15 -14
- package/server/views/settings.ejs +1 -3
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -1279,6 +1279,21 @@ class Server {
|
|
|
1279
1279
|
|
|
1280
1280
|
if (existing_home) {
|
|
1281
1281
|
// if the home is already set, move
|
|
1282
|
+
|
|
1283
|
+
//// Next, empty the bin folder => need to reinitialize because of symlinks, etc. with the package managers
|
|
1284
|
+
console.log("RUNNING RM BIN")
|
|
1285
|
+
const path_to_delete = path.resolve(existing_home, "bin")
|
|
1286
|
+
let del_cmd
|
|
1287
|
+
if (this.kernel.platform === "win32") {
|
|
1288
|
+
del_cmd = `start /wait rd /s /q ${path_to_delete}`
|
|
1289
|
+
} else {
|
|
1290
|
+
del_cmd = `rm -rf ${path_to_delete}`
|
|
1291
|
+
}
|
|
1292
|
+
console.log("del_cmd", del_cmd)
|
|
1293
|
+
|
|
1294
|
+
await this.sudo_exec(del_cmd, new_home)
|
|
1295
|
+
console.log("FINISHED RM BIN")
|
|
1296
|
+
|
|
1282
1297
|
console.log("RUNNING MV")
|
|
1283
1298
|
let mv_cmd
|
|
1284
1299
|
if (this.kernel.platform === "win32") {
|
|
@@ -1295,20 +1310,6 @@ class Server {
|
|
|
1295
1310
|
}
|
|
1296
1311
|
console.log("FINISHED MV")
|
|
1297
1312
|
|
|
1298
|
-
//// Next, empty the bin folder => need to reinitialize because of symlinks, etc. with the package managers
|
|
1299
|
-
console.log("RUNNING RM BIN")
|
|
1300
|
-
const path_to_delete = path.resolve(new_home, "bin")
|
|
1301
|
-
let del_cmd
|
|
1302
|
-
if (this.kernel.platform === "win32") {
|
|
1303
|
-
del_cmd = `start /wait rd /s /q ${path_to_delete}`
|
|
1304
|
-
} else {
|
|
1305
|
-
del_cmd = `rm -rf ${path_to_delete}`
|
|
1306
|
-
}
|
|
1307
|
-
console.log("del_cmd", del_cmd)
|
|
1308
|
-
|
|
1309
|
-
await this.sudo_exec(del_cmd, new_home)
|
|
1310
|
-
console.log("FINISHED RM BIN")
|
|
1311
|
-
|
|
1312
1313
|
// set home=new_home
|
|
1313
1314
|
this.kernel.store.set("home", new_home)
|
|
1314
1315
|
// delete new_home
|
|
@@ -232,7 +232,7 @@ header .home {
|
|
|
232
232
|
<button id='save' class='btn disabled'>Save</button>
|
|
233
233
|
</form>
|
|
234
234
|
<div class='loading hidden'>
|
|
235
|
-
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by
|
|
235
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> Stand by. Do not close this window..
|
|
236
236
|
</div>
|
|
237
237
|
</div>
|
|
238
238
|
</div>
|
|
@@ -262,8 +262,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
262
262
|
}).then((res) => {
|
|
263
263
|
return res.json()
|
|
264
264
|
})
|
|
265
|
-
document.querySelector(".loading").classList.add("hidden")
|
|
266
|
-
return
|
|
267
265
|
if (r.success) {
|
|
268
266
|
//alert("Successfully updated the pinokio home to " + val)
|
|
269
267
|
fetch("/restart", {
|