Skip to content

Commit 58277a1

Browse files
committed
chore/add exec opts
1 parent 69daf8c commit 58277a1

4 files changed

Lines changed: 7 additions & 1 deletion

File tree

lib/executor.circle.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ async function circleExecutor(runOptions, commandsArray): Promise<{ retriable: s
3434
logMiddleResultsCycle = internalLogMiddleResultsCycle,
3535
onExitCloseProcess,
3636
onErrorProcess,
37+
execOpts,
3738
} = runOptions;
3839

3940
/**
@@ -54,6 +55,7 @@ async function circleExecutor(runOptions, commandsArray): Promise<{ retriable: s
5455
logProcessResult,
5556
onExitCloseProcess,
5657
onErrorProcess,
58+
execOpts,
5759
});
5860

5961
async function runCommand(commands, retriable, runIndex) {

lib/executor.intime.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
3030
logEndCycle = internalLogEndCycle,
3131
logMiddleResultsCycle = internalLogMiddleResultsCycle,
3232
logIntimeCommand = internalLogIntimeCommand,
33+
execOpts,
3334
} = runOptions;
3435

3536
const executeCommandAsync = buildCommandExecutor(notRetriable, {
@@ -38,6 +39,7 @@ async function intimeExecutor(runOptions, commandsArray): Promise<{ retriable: s
3839
processResultAnalyzer,
3940
pollTime,
4041
successExitCode,
42+
execOpts,
4143
});
4244

4345
const inTimeCommands = commandsArray.map(cmd => ({

lib/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { logger } from 'sat-utils';
22
import { getPollTime } from './helpers';
33
import { circleExecutor } from './executor.circle';
44
import { intimeExecutor } from './executor.intime';
5+
import type { ExecOptions } from 'child_process';
56

67
function reRunnerBuilder(runOptions) {
78
const { logLevel = 'ERROR', intime = false, ...executorOptions } = runOptions;
@@ -18,6 +19,7 @@ export type TBuildOpts = {
1819
longestProcessTime?: number;
1920
successExitCode?: number;
2021
pollTime?: number;
22+
execOpts?: ExecOptions;
2123
processResultAnalyzer?: (originalCommand: string, stack: string, notRetriable: any[]) => string | boolean;
2224
everyCycleCallback?: () => void;
2325
watcher?: () => void;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "process-rerun",
3-
"version": "0.3.0",
3+
"version": "0.3.1",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/potapovDim/protractor-rerun.git"

0 commit comments

Comments
 (0)