aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrey Bastian <hello@treybastian.com>2025-10-28 10:31:05 +0000
committerTrey Bastian <hello@treybastian.com>2025-10-28 10:31:05 +0000
commited67aeee52591ff94433dfcbdf97fdb0a8932c36 (patch)
tree77fe58733979f3e396592ca417fe5b0a4dd7d120
parentecc5e73cf991dc4e3cfe87312179f57021f2b1f5 (diff)
fixed escaping vars
-rw-r--r--post-receive5
1 files changed, 4 insertions, 1 deletions
diff --git a/post-receive b/post-receive
index 28db0c5..707bb96 100644
--- a/post-receive
+++ b/post-receive
@@ -23,7 +23,10 @@ sync_repo() {
}
# make sure the sync occurs in the background
-nohub bash -c " it push --mirror "$REPO_URL" >> "$LOGFILE" 2>&1" > /dev/nul 2>&1 &
+nohup bash -c "
+ cd \"$REPO_PATH\" || exit 1
+ git push --mirror \"$REPO_URL\" >> \"$LOGFILE\" 2>&1
+" > /dev/nul 2>&1 &
# vim: filetype=sh