Skip to content

Conversation

@RetricSu
Copy link
Collaborator

On Windows, batch files (.cmd) do not forward stdin to child processes. This breaks tools like ckb-testtool that pass transaction data via stdin using spawnSync with the input option.

Replace the Windows batch file with a Node.js script that uses spawn with stdio: 'inherit' to properly forward stdin, stdout, and stderr.

On Windows, batch files (.cmd) do not forward stdin to child processes.
This breaks tools like ckb-testtool that pass transaction data via stdin
using spawnSync with the input option.

Replace the Windows batch file with a Node.js script that uses spawn
with stdio: 'inherit' to properly forward stdin, stdout, and stderr.
Now that Windows supports stdin forwarding via the Node.js wrapper,
we can enable mock tests on Windows by commenting out the
setWasmDebuggerEnabled(true) line in generated test files.

Changes:
- Detect Windows platform early in create-test.sh
- Post-process mock.test files on Windows to comment out WASM mode
- Remove Windows test skip logic (now runs all tests on all platforms)

This allows GitHub Actions Windows CI to test the stdin forwarding fix.
On Windows, npm global installs create .cmd files that require shell
execution. Change the Node.js wrapper to use shell: isWindows so that
spawn can properly find and execute offckb.cmd via cmd.exe.

This fixes the build failure in CI:
  Failed to start offckb: spawn offckb ENOENT
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@RetricSu RetricSu closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants