pinokiod 0.1.12 → 0.1.13

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 +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1223,10 +1223,11 @@ class Server {
1223
1223
  async sudo_exec(message, homedir) {
1224
1224
  console.log("sudo_exec", { message, homedir })
1225
1225
  // sudo-prompt uses TEMP
1226
- let TEMP = path.resolve(homedir, "cache", "TEMP")
1227
- await fs.promises.mkdir(TEMP, { recursive: true }).catch((e) => { })
1226
+ // let TEMP = path.resolve(homedir, "cache", "TEMP")
1227
+ // await fs.promises.mkdir(TEMP, { recursive: true }).catch((e) => { })
1228
1228
  let response = await new Promise((resolve, reject) => {
1229
- let env = { TEMP }
1229
+ // let env = { TEMP }
1230
+ let env = {}
1230
1231
  if (process.env.path) env.path = process.env.path
1231
1232
  if (process.env.Path) env.Path = process.env.Path
1232
1233
  if (process.env.PATH) env.PATH = process.env.PATH
@@ -1281,7 +1282,7 @@ class Server {
1281
1282
  console.log("RUNNING MV")
1282
1283
  let mv_cmd
1283
1284
  if (this.kernel.platform === "win32") {
1284
- mv_cmd = `robocopy ${existing_home} ${new_home} /E /MOVE`
1285
+ mv_cmd = `start /wait robocopy ${existing_home} ${new_home} /E /MOVE`
1285
1286
  } else {
1286
1287
  mv_cmd = `mv ${existing_home} ${new_home}`
1287
1288
  }
@@ -1293,7 +1294,7 @@ class Server {
1293
1294
  const path_to_delete = path.resolve(new_home, "bin")
1294
1295
  let del_cmd
1295
1296
  if (this.kernel.platform === "win32") {
1296
- del_cmd = `rd /s /q ${path_to_delete}`
1297
+ del_cmd = `start /wait rd /s /q ${path_to_delete}`
1297
1298
  } else {
1298
1299
  del_cmd = `rm -rf ${path_to_delete}`
1299
1300
  }