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.
- package/kernel/util.js +6 -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("> [
|
|
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,
|
|
239
|
+
parse_env, log_path, api_path, update_env, parse_env_detail, openfs, port_running, du, is_port_available
|
|
236
240
|
}
|