pinokiod 3.3.32 → 3.3.34

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/kernel/util.js +6 -2
  2. package/package.json +1 -1
package/kernel/util.js CHANGED
@@ -50,8 +50,12 @@ const is_port_available = async (port) => {
50
50
  }); // Close the server immediately after testing
51
51
  }
52
52
  });
53
+ server.on('error', (err) => {
54
+ console.log("> [3 port not available]", err);
55
+ resolve(false); // Port is occupied
56
+ });
53
57
  } catch (e) {
54
- console.log("> [3 port not available]", err)
58
+ console.log("> [4 port not available]", err)
55
59
  resolve(false) // port not available
56
60
  }
57
61
  });
@@ -232,5 +236,5 @@ const update_env = async (filepath, changes) => {
232
236
  await fs.promises.writeFile(filepath, newval)
233
237
  };
234
238
  module.exports = {
235
- parse_env, log_path, api_path, update_env, parse_env_detail, openfs, port_running, du, is_port_running
239
+ parse_env, log_path, api_path, update_env, parse_env_detail, openfs, port_running, du, is_port_available
236
240
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.3.32",
3
+ "version": "3.3.34",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {