diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..600d2d3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode \ No newline at end of file diff --git a/healthUtil.ts b/healthUtil.ts index d332fe5..8c8b5db 100644 --- a/healthUtil.ts +++ b/healthUtil.ts @@ -19,6 +19,15 @@ export const checkWebUrl: ( }; }; +export const runHealthScript = ({command, args}: { command: string, args: string[] }) => async (effects: Effects, _duration: number): Promise> => { + const res = await effects.runCommand({ command, args }) + if ('result' in res){ + return { result: null } + } else { + return res + } +} + // Ensure the starting duration is pass a minimum export const guardDurationAboveMinimum = ( input: { duration: number; minimumTime: number },