From 13e6765ef7eaac48c764e19399d5f2b4180c3fc9 Mon Sep 17 00:00:00 2001 From: Sam Thomas Date: Wed, 29 Nov 2023 11:38:51 +0000 Subject: [PATCH] refactor: return output --- src/git/doGitDiff.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/git/doGitDiff.ts b/src/git/doGitDiff.ts index 78498769..8281a24f 100644 --- a/src/git/doGitDiff.ts +++ b/src/git/doGitDiff.ts @@ -2,5 +2,9 @@ import spawn from "../utils/spawn.js"; import gitLogger from "./utils/gitLogger.js"; export default async function gitDiff() { - await spawn("git", ["--no-pager", "diff", "--name-only"], gitLogger); + return ( + await spawn("git", ["--no-pager", "diff", "--name-only"], gitLogger) + ).stdout + .trim() + .split("\n"); }