Skip to content

Commit f5b4fd3

Browse files
committed
fix(yolo-win-wsl): add usbipd PATH fallback in wsl_wrapper
1 parent c3e7fd6 commit f5b4fd3

File tree

1 file changed

+7
-0
lines changed
  • skills/detection/yolo-detection-2026-coral-tpu-win-wsl/scripts

1 file changed

+7
-0
lines changed

skills/detection/yolo-detection-2026-coral-tpu-win-wsl/scripts/wsl_wrapper.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
const { spawn } = require('child_process');
22
const path = require('path');
33

4+
// Ensure usbipd is on PATH (Aegis might have booted before the MSI updated System PATH)
5+
const env = { ...process.env };
6+
if (process.platform === 'win32' && (!env.PATH || !env.PATH.toLowerCase().includes('usbipd-win'))) {
7+
env.PATH = `${env.PATH || ''};C:\\Program Files\\usbipd-win\\`;
8+
}
9+
410
// 1. Spawan usbipd auto-attach process in the background
511
// This guarantees that the Google Coral USB Accelerator is actively passed
612
// to the WSL linux kernel as soon as this inference script starts!
713
const attachProcess = spawn('usbipd', ['attach', '--wsl', '--auto-attach', '--hardware-id', '18d1:9302'], {
14+
env,
815
stdio: 'ignore', // We do not want usbipd logs corrupting the JSONL stdout stream!
916
detached: true
1017
});

0 commit comments

Comments
 (0)