From 892ab7db122596e9c80ccbb06bb3e85cf0138755 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Thu, 22 Jun 2023 21:48:21 -0600 Subject: [PATCH] Updated error message --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index f263be05..8b3c2d83 100644 --- a/src/main.ts +++ b/src/main.ts @@ -307,6 +307,13 @@ export async function run(): Promise { } await getChangedFilesFromRESTAPI({inputs, env, workingDirectory}) } else { + if (!hasGitDirectory) { + core.setFailed( + "Can't find local .git directory. Please run actions/checkout before this action" + ) + return + } + core.info('Running via local git') await getChangedFilesFromLocalGit({inputs, env, workingDirectory}) }