Title: Windows: 4 个测试因依赖 Unix 特定机制无法运行 · Issue #81 · lessweb/deepcode-cli · GitHub
Open Graph Title: Windows: 4 个测试因依赖 Unix 特定机制无法运行 · Issue #81 · lessweb/deepcode-cli
X Title: Windows: 4 个测试因依赖 Unix 特定机制无法运行 · Issue #81 · lessweb/deepcode-cli
Description: 问题 以下 4 个测试因依赖 Unix 特有的工具或执行机制,在 Windows 上无法正常运行: 1. readClipboardImage uses osascript fallback on macOS when pngpaste is missing 文件:src/tests/clipboard.test.ts 原因:mock 脚本使用 #!/bin/sh shebang,Windows 不识别;osascript 是 macOS 独占工具 2. launchN...
Open Graph Description: 问题 以下 4 个测试因依赖 Unix 特有的工具或执行机制,在 Windows 上无法正常运行: 1. readClipboardImage uses osascript fallback on macOS when pngpaste is missing 文件:src/tests/clipboard.test.ts 原因:mock 脚本使用 #!/bin/sh shebang,Windo...
X Description: 问题 以下 4 个测试因依赖 Unix 特有的工具或执行机制,在 Windows 上无法正常运行: 1. readClipboardImage uses osascript fallback on macOS when pngpaste is missing 文件:src/tests/clipboard.test.ts 原因:mock 脚本使用 #!/bin/sh shebang,Windo...
Opengraph URL: https://github.com/lessweb/deepcode-cli/issues/81
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Windows: 4 个测试因依赖 Unix 特定机制无法运行","articleBody":"## 问题\n\n以下 4 个测试因依赖 Unix 特有的工具或执行机制,在 Windows 上无法正常运行:\n\n### 1. `readClipboardImage uses osascript fallback on macOS when pngpaste is missing`\n- **文件**:`src/tests/clipboard.test.ts`\n- **原因**:mock 脚本使用 `#!/bin/sh` shebang,Windows 不识别;`osascript` 是 macOS 独占工具\n\n### 2. `launchNotifyScript passes DURATION and falls back to /bin/sh for non-executable scripts`\n- **文件**:`src/tests/settings-and-notify.test.ts`\n- **原因**:硬编码 Unix 路径 `/tmp/notify.sh` 和 `/bin/sh`\n\n### 3. `SessionManager adds -y when launching MCP servers through npx`\n- **文件**:`src/tests/session.test.ts`\n- **原因**:mock `npx` 可执行文件无扩展名,Windows 上 `cmd.exe` 通过 PATHEXT 无法找到\n\n### 4. `WebSearch executes the configured script with the query as one argument`\n- **文件**:`src/tests/web-search-handler.test.ts`\n- **原因**:创建 `#!/bin/sh` 脚本文件,Windows `spawn()` 抛出 `EFTYPE`\n\n## 当前状态\n\nPR #77 中已将这 4 个测试标记为 `skip: process.platform === \"win32\"` 以恢复 Windows CI。\n\n## 修复方向\n\n- macOS 专用测试 → 维持跳过,追加平台备注\n- `/bin/sh` 回退 → 测试代码层面模拟,不实际调用 shell\n- npx mock → Windows 上创建 `npx.cmd` 替代无扩展名文件\n- WebSearch 脚本 → 改用跨平台兼容的 spawn 方式","author":{"url":"https://github.com/Lellansin","@type":"Person","name":"Lellansin"},"datePublished":"2026-05-16T04:43:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/81/deepcode-cli/issues/81"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2f9ab514-0493-b26b-5cfe-6abf6db64899 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85EA:13C54:580DFDC:7C7A01F:6A500A46 |
| html-safe-nonce | 9414d68456bebfa2f0cadfff56ecdff3c4c34c5f0f985a6b8fdb35a6ac2dc4d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUVBOjEzQzU0OjU4MERGREM6N0M3QTAxRjo2QTUwMEE0NiIsInZpc2l0b3JfaWQiOiI2NzgxNTUxMzk5OTIwNDcwNTk4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0c969e01e36400d9f690ceafc6de1648834994159dc7a78e3e4f7b4e50408a94 |
| hovercard-subject-tag | issue:4458564590 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/lessweb/deepcode-cli/81/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3f225e296c7f3d4c2287eae8863536130d7e3181104d6d8e85116987b1f9d339/lessweb/deepcode-cli/issues/81 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3f225e296c7f3d4c2287eae8863536130d7e3181104d6d8e85116987b1f9d339/lessweb/deepcode-cli/issues/81 |
| og:image:alt | 问题 以下 4 个测试因依赖 Unix 特有的工具或执行机制,在 Windows 上无法正常运行: 1. readClipboardImage uses osascript fallback on macOS when pngpaste is missing 文件:src/tests/clipboard.test.ts 原因:mock 脚本使用 #!/bin/sh shebang,Windo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lellansin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56eec25a3430492dd6ec2a480eb33256a0da5192d5714b0db4f5ab5f33203d94 |
| turbo-cache-control | no-preview |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93a615b89b7dcbdb6b678f4772931ecc28ada82a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width