@onklave/agent-cli 0.1.47 → 0.1.48
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/main.js +6 -0
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -4812,6 +4812,12 @@ function readPid(pidFile) {
|
|
|
4812
4812
|
function writePid(pidFile) {
|
|
4813
4813
|
const dir = path10.dirname(pidFile);
|
|
4814
4814
|
fs10.mkdirSync(dir, { recursive: true });
|
|
4815
|
+
try {
|
|
4816
|
+
if (fs10.statSync(pidFile).isDirectory()) {
|
|
4817
|
+
fs10.rmSync(pidFile, { recursive: true, force: true });
|
|
4818
|
+
}
|
|
4819
|
+
} catch {
|
|
4820
|
+
}
|
|
4815
4821
|
fs10.writeFileSync(pidFile, String(process.pid), { mode: 384 });
|
|
4816
4822
|
}
|
|
4817
4823
|
function removePid(pidFile) {
|