diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-01-04 00:07:31 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2017-01-04 00:07:31 +0100 |
commit | 77d89f64161e001c91fd7ca60e298a69d35e2050 (patch) | |
tree | b788d03eeabc69aac3b16fc72212ec50365591bc /src | |
parent | 0f6fe3e044519d15d1e54d3ef1088b5107bc21a9 (diff) | |
download | blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.tar.gz blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.tar.bz2 blogc-77d89f64161e001c91fd7ca60e298a69d35e2050.zip |
git-receiver: detect if pre-receive is running from git using env var
Diffstat (limited to 'src')
-rw-r--r-- | src/blogc-git-receiver/pre-receive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blogc-git-receiver/pre-receive.c b/src/blogc-git-receiver/pre-receive.c index 9772a2f..c780055 100644 --- a/src/blogc-git-receiver/pre-receive.c +++ b/src/blogc-git-receiver/pre-receive.c @@ -112,7 +112,7 @@ bgr_pre_receive_hook(int argc, char *argv[]) goto cleanup; } - if (isatty(STDIN_FILENO)) { + if (NULL == getenv("GIT_DIR")) { char *htdocs_sym = bc_strdup_printf("%s/htdocs", repo_dir); if (0 != access(htdocs_sym, R_OK)) { fprintf(stderr, "error: no previous build found. nothing to " |