diff options
| author | Leo Goetz <dev@leogtz.de> | 2026-05-24 06:50:57 +0200 |
|---|---|---|
| committer | Leo Goetz <dev@leogtz.de> | 2026-05-24 06:50:57 +0200 |
| commit | ca8537af0ab596fddd8d72e6630f278326ef5360 (patch) | |
| tree | 170d9f82b28f292f40785e33b3981121b6793c3c /src/utils/helper.ts | |
| parent | d05bfaf95fb666fea02c8aceae3ce02c9e315d3d (diff) | |
feat: added fix functionality
Diffstat (limited to 'src/utils/helper.ts')
| -rw-r--r-- | src/utils/helper.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/utils/helper.ts b/src/utils/helper.ts new file mode 100644 index 0000000..379aeef --- /dev/null +++ b/src/utils/helper.ts @@ -0,0 +1,15 @@ +import { exec, type ExecException } from "child_process"; + +export async function pullLatest(path: string) { + await promiseExec(`cd "${path}" && git pull`); +} + +export function promiseExec( + cmd: string, +): Promise<{ error: ExecException | null; stdout: string; stderr: string }> { + return new Promise((resolve, _) => { + exec(cmd, (error, stdout, stderr) => { + resolve({ error, stdout, stderr }); + }); + }); +} |
