summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-02-27 10:54:28 +0200
committerTimo Teräs <timo.teras@iki.fi>2017-02-27 10:54:28 +0200
commit704694bd1daf6d58ddf831f0c1a895a84fd95c1e (patch)
tree255a86600bf7df08835691b7eb12949b94e533c0 /src/commit.c
parent72b878e6551be026316d26550ebceeb0c863a6bb (diff)
downloadapk-tools-704694bd1daf6d58ddf831f0c1a895a84fd95c1e.tar.gz
apk-tools-704694bd1daf6d58ddf831f0c1a895a84fd95c1e.tar.bz2
apk-tools-704694bd1daf6d58ddf831f0c1a895a84fd95c1e.tar.xz
apk-tools-704694bd1daf6d58ddf831f0c1a895a84fd95c1e.zip
commit: fix to work if commit_hook.d directory does not exist
Diffstat (limited to 'src/commit.c')
-rw-r--r--src/commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit.c b/src/commit.c
index ae9e2c9..80b2c13 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -238,7 +238,7 @@ static int run_commit_hook(void *ctx, int dirfd, const char *file)
if (apk_verbosity >= 2) apk_message("Executing: %s %s", fn, commit_hook_str[hook->type]);
if (apk_db_run_script(db, fn, argv) < 0 && hook->type == PRE_COMMIT_HOOK)
- return -1;
+ return -2;
return 0;
}
@@ -312,7 +312,7 @@ int apk_solver_commit_changeset(struct apk_database *db,
}
}
- if (run_commit_hooks(db, PRE_COMMIT_HOOK) < 0)
+ if (run_commit_hooks(db, PRE_COMMIT_HOOK) == -2)
return -1;
/* Go through changes */