summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/upgrade.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/upgrade.sh b/contrib/upgrade.sh
index 9a5e903b6b..3a98c277d6 100755
--- a/contrib/upgrade.sh
+++ b/contrib/upgrade.sh
@@ -24,7 +24,8 @@
function giteacmd {
if [[ $sudocmd = "su" ]]; then
- "$sudocmd" - "$giteauser" -c "$giteabin" --config "$giteaconf" --work-path "$giteahome" "$@"
+ # `-c` only accept one string as argument.
+ "$sudocmd" - "$giteauser" -c "$(printf "%q " "$giteabin" "--config" "$giteaconf" "--work-path" "$giteahome" "$@")"
else
"$sudocmd" --user "$giteauser" "$giteabin" --config "$giteaconf" --work-path "$giteahome" "$@"
fi