diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-17 06:45:19 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-17 06:45:19 +0800 |
commit | bf803bfa2bd183c7c1febc261fc1c9f72152af2b (patch) | |
tree | 48ee35d0dd65f6a25d8ab91be515c9d991564a79 /git_hooks_client/git_hooks_client.c | |
parent | git_hooks_client: Ensure stdin is a pipe (diff) | |
download | forge-bf803bfa2bd183c7c1febc261fc1c9f72152af2b.tar.gz forge-bf803bfa2bd183c7c1febc261fc1c9f72152af2b.tar.zst forge-bf803bfa2bd183c7c1febc261fc1c9f72152af2b.zip |
git_hooks_client: Produce useful error message on missing env var
Diffstat (limited to 'git_hooks_client/git_hooks_client.c')
-rw-r--r-- | git_hooks_client/git_hooks_client.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git_hooks_client/git_hooks_client.c b/git_hooks_client/git_hooks_client.c index f402c26..0d736a9 100644 --- a/git_hooks_client/git_hooks_client.c +++ b/git_hooks_client/git_hooks_client.c @@ -13,6 +13,7 @@ int main(void) { const char *socket_path = getenv("LINDENII_FORGE_HOOKS_SOCKET_PATH"); if (socket_path == NULL) { + dprintf(STDERR_FILENO, "fatal: environment variable LINDENII_FORGE_HOOKS_SOCKET_PATH undefined\n"); return EXIT_FAILURE; } |