pinokiod 0.1.16 → 0.1.18

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 +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1282,11 +1282,17 @@ class Server {
1282
1282
  console.log("RUNNING MV")
1283
1283
  let mv_cmd
1284
1284
  if (this.kernel.platform === "win32") {
1285
- mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE /NFL /NDL`
1285
+ // robocoyp returns 1 when successful
1286
+ //mv_cmd = `start /wait (robocopy ${existing_home} ${new_home} /E /MOVE /NFL /NDL) ^& IF %ERRORLEVEL% LEQ 1 exit 0`
1287
+ mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE /NFL /NDL)`
1286
1288
  } else {
1287
1289
  mv_cmd = `mv ${existing_home} ${new_home}`
1288
1290
  }
1289
- await this.sudo_exec(mv_cmd, existing_home)
1291
+ try {
1292
+ await this.sudo_exec(mv_cmd, existing_home)
1293
+ } catch (e) {
1294
+ console.log("E", e)
1295
+ }
1290
1296
  console.log("FINISHED MV")
1291
1297
 
1292
1298
  //// Next, empty the bin folder => need to reinitialize because of symlinks, etc. with the package managers