Skip to content

Commit

Permalink
fix: node doesn't run .bat files on windows (#504)
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vahlbrock <[email protected]>
  • Loading branch information
timvahlbrock authored May 8, 2024
1 parent 11e6f73 commit 4f125b3
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion bin/pact-broker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.brokerFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
4 changes: 3 additions & 1 deletion bin/pact-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.messageFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
8 changes: 6 additions & 2 deletions bin/pact-mock-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.mockServiceFullPath,
process.argv.slice(2),
{ stdio: 'inherit' }
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
4 changes: 3 additions & 1 deletion bin/pact-provider-verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.verifierFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
4 changes: 3 additions & 1 deletion bin/pact-stub-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.stubFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
4 changes: 3 additions & 1 deletion bin/pact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.pactFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);
4 changes: 3 additions & 1 deletion bin/pactflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import childProcess = require('child_process');
import rubyStandalone from '../src/pact-standalone';

const { status } = childProcess.spawnSync(
const { error, status } = childProcess.spawnSync(
rubyStandalone.pactflowFullPath,
process.argv.slice(2),
{
stdio: 'inherit',
shell: true,
}
);
if (error) throw error;
process.exit(status as number);

0 comments on commit 4f125b3

Please sign in to comment.