From 143c8a8f3e510470a53a6c9e30787c3a944745ec Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Mon, 26 Jan 2026 17:54:46 -0600 Subject: [PATCH] ci: add test for Windows CMD wrapper (#289) * ci: add test for Windows CMD wrapper This test will fail until the CMD wrapper is fixed to call the native binary. * fix: Windows CMD wrapper calls native binary instead of missing index.js --- .github/workflows/ci.yml | 5 +++++ bin/agent-browser.cmd | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c7ee5a8..88e7495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,6 +138,11 @@ jobs: run: | Copy-Item cli/target/x86_64-pc-windows-msvc/release/agent-browser.exe bin/agent-browser-win32-x64.exe + - name: Test CMD wrapper works + run: | + bin\agent-browser.cmd --version + shell: cmd + - name: Test agent-browser install command run: | $env:PATH = "$pwd\bin;$env:PATH" diff --git a/bin/agent-browser.cmd b/bin/agent-browser.cmd index 58750e2..3fa04c5 100644 --- a/bin/agent-browser.cmd +++ b/bin/agent-browser.cmd @@ -1,5 +1,13 @@ @echo off setlocal set "SCRIPT_DIR=%~dp0" -node "%SCRIPT_DIR%..\dist\index.js" %* -exit /b %errorlevel% +set "BINARY=%SCRIPT_DIR%agent-browser-win32-x64.exe" + +if exist "%BINARY%" ( + "%BINARY%" %* + exit /b %errorlevel% +) + +echo Error: No binary found for win32-x64 >&2 +echo Run 'npm run build:native' to build for your platform >&2 +exit /b 1