Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

install: Run git config commands from a known readable cwd.

Anders Kaseorg09f6ba1971b0
diff --git a/scripts/lib/install b/scripts/lib/install
index 73bbdf05559..d55856bc76a 100755
--- a/scripts/lib/install
+++ b/scripts/lib/install
@@ -524,8 +524,11 @@ if has_class "zulip::app_frontend_base"; then
fi
# Set up a basic .gitconfig for the 'zulip' user
-su zulip -c "git config --global user.email $ZULIP_ADMINISTRATOR"
-su zulip -c "git config --global user.name 'Zulip Server ($EXTERNAL_HOST)'"
+(
+ cd / # Make sure the current working directory is readable by zulip
+ su zulip -c "git config --global user.email $ZULIP_ADMINISTRATOR"
+ su zulip -c "git config --global user.name 'Zulip Server ($EXTERNAL_HOST)'"
+)
if [ -n "$NO_INIT_DB" ]; then
set +x