claude-hook-notify 1.2.0 → 1.2.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/notify.js +2 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-hook-notify",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "🔔 Claude Code 任务完成桌面通知 — 一键安装,跨平台支持",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/notify.js CHANGED
@@ -278,19 +278,8 @@ async function sendNotification(options = {}) {
278
278
 
279
279
  try {
280
280
  if (command) {
281
- if (platform === "win32") {
282
- // Windows: spawn detached so hook exits immediately, notification lives independently
283
- const { spawn } = require("child_process");
284
- const child = spawn(command, args, {
285
- detached: true,
286
- stdio: "ignore",
287
- windowsHide: true,
288
- });
289
- child.unref();
290
- } else {
291
- const { execFileSync } = require("child_process");
292
- execFileSync(command, args, { stdio: "ignore", timeout: 5000 });
293
- }
281
+ const { execFileSync } = require("child_process");
282
+ execFileSync(command, args, { stdio: "ignore", timeout: 8000 });
294
283
  }
295
284
  } catch (err) {
296
285
  result.sent = false;