Files
gbuild/include/hooks.h
T

19 lines
525 B
C
Raw Normal View History

2026-05-23 21:03:54 +02:00
#ifndef HOOKS_H
#define HOOKS_H
#include "logger.h"
/*
* Run cmd in a shell with working directory set to working_dir.
* stdout and stderr from the hook are streamed through log.
*
* Returns the hook's exit status (0 = success, >0 = hook failure),
* or -1 if the shell could not be launched.
*
* The caller is responsible for distinguishing hook failure from build
* failure — this function never touches build state.
*/
int hook_run(const char *cmd, const char *working_dir, Logger *log);
#endif /* HOOKS_H */