Skip to content

fix(terminal): enable shell execution on windows for spawn compatibility #14

fix(terminal): enable shell execution on windows for spawn compatibility

fix(terminal): enable shell execution on windows for spawn compatibility #14

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build-check:
name: Build Check (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.7.5
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Verify Node.js
shell: bash
run: node --version
- name: Setup Node.js PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
id: node_path
run: |
$nodeDir = (Get-Command node).Source | Split-Path -Parent
$nodeDirBash = "/c" + ($nodeDir -replace ':\\', '/' -replace '\\', '/')
echo "node_dir=$nodeDir" >> $env:GITHUB_OUTPUT
echo "node_dir_bash=$nodeDirBash" >> $env:GITHUB_OUTPUT
echo "Windows path: $nodeDir"
echo "Bash path: $nodeDirBash"
- name: Format check
shell: bash
run: deno fmt --check src/
- name: Lint
run: deno lint src/
- name: Type check
run: deno check src/index.ts
- name: Test
shell: bash
run: |
if [ "${{ runner.os }}" = "Windows" ]; then
export PATH="${{ steps.node_path.outputs.node_dir_bash }}:$PATH"
fi
echo "PATH: $PATH"
which node || echo "node not in PATH"
deno test --allow-read --allow-env --allow-run