@honor-claw/yoyo 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honor-claw/yoyo",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "OpenClaw Honor Yoyo connection plugin",
5
5
  "keywords": [
6
6
  "ai",
@@ -14,8 +14,15 @@ export class MacOSDeviceInfoProvider implements DeviceInfoProvider {
14
14
  */
15
15
  private execCommand(command: string): string {
16
16
  try {
17
- return execSync(command, { encoding: 'utf-8' }).trim();
18
- } catch {
17
+ return execSync(command, {
18
+ encoding: 'utf-8',
19
+ shell: '/bin/zsh', // 明确指定 shell
20
+ timeout: 10000, // 10秒超时
21
+ stdio: ['ignore', 'pipe', 'pipe'] // 捕获错误输出
22
+ }).trim();
23
+ } catch (error) {
24
+ // 记录错误信息以便调试
25
+ console.error(`Command failed: ${command}`, error);
19
26
  return '';
20
27
  }
21
28
  }