pinokiod 0.1.20 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +15 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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