Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Aug 19, 2024
1 parent 60b1580 commit a632c6d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ defaults:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ ubuntu-latest, windows-latest, macos-latest ]
node-version: [ 16.x, 18.x, 20.x ]

steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions demo/react-native/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const testData = require('../../../resources/.test/test_data.json');

const availableLanguages = testData.tests.language_tests.map((x) => x.language);

const commands = process.argv.slice(2, -1);
const args = process.argv.slice(2, -1);
const language = process.argv.slice(-1)[0];

if (!availableLanguages.includes(language)) {
Expand Down Expand Up @@ -63,7 +63,7 @@ fs.writeFileSync(

const command = process.platform === 'win32' ? 'npx.cmd' : 'npx';

child_process.spawn('react-native', commands, {
execPath: command,
shell: true
child_process.execSync(`${command} react-native ${args.join(" ")}`, {
shell: true,
stdio: 'inherit'
});
8 changes: 4 additions & 4 deletions demo/react/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const availableLanguages = testData["tests"]["language_tests"].map(
(x) => x["language"]
);

const commands = process.argv.slice(2, -1);
const args = process.argv.slice(2, -1);
const language = process.argv.slice(-1)[0];
if (!language) {
console.error(
Expand Down Expand Up @@ -62,7 +62,7 @@ fs.writeFileSync(

const command = process.platform === "win32" ? "npx.cmd" : "npx";

child_process.spawn("react-scripts", commands, {
execPath: command,
shell: true
child_process.execSync(`${command} react-scripts ${args.join(" ")}`, {
shell: true,
stdio: 'inherit'
});
6 changes: 3 additions & 3 deletions demo/web/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fs.writeFileSync(

const command = (process.platform === "win32") ? "npx.cmd" : "npx";

child_process.spawn("http-server", ["-a", "localhost", "-p", "5000"], {
execPath: command,
shell: true
child_process.execSync(`${command} http-server -a localhost -p 5000`, {
shell: true,
stdio: 'inherit'
});

0 comments on commit a632c6d

Please sign in to comment.