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 },