git: Use AUR_USER env var instead of ForceCommand argument

Also add an utility function for formatting the ForceCommand, using
shlex.quote to quote the value.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Johannes Löthberg 2015-06-23 14:18:12 +02:00 committed by Lukas Fleischer
parent ae2907a57e
commit e9485531be
2 changed files with 24 additions and 3 deletions

View file

@ -106,7 +106,7 @@ def die(msg):
def die_with_help(msg):
die(msg + "\nTry `{:s} help` for a list of commands.".format(ssh_cmdline))
user = sys.argv[1]
user = os.environ.get("AUR_USER")
cmd = os.environ.get("SSH_ORIGINAL_COMMAND")
if not cmd:
die_with_help("Interactive shell is disabled.")