grepmax 0.10.0 → 0.10.1
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/dist/commands/watch.js
CHANGED
|
@@ -77,6 +77,12 @@ exports.watch = new commander_1.Command("watch")
|
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (options.background) {
|
|
80
|
+
// Skip spawn if daemon already running — prevents process accumulation
|
|
81
|
+
// when SessionStart hook fires on every session/clear/resume
|
|
82
|
+
const { isDaemonRunning } = yield Promise.resolve().then(() => __importStar(require("../lib/utils/daemon-client")));
|
|
83
|
+
if (yield isDaemonRunning()) {
|
|
84
|
+
process.exit(0);
|
|
85
|
+
}
|
|
80
86
|
const logFile = path.join(config_1.PATHS.logsDir, "daemon.log");
|
|
81
87
|
const out = (0, log_rotate_1.openRotatedLog)(logFile);
|
|
82
88
|
const child = (0, node_child_process_1.spawn)(process.argv[0], [process.argv[1], "watch", "--daemon"], {
|
package/package.json
CHANGED