summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautopeer_shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/autopeer_shell.py b/autopeer_shell.py
index 4fe30b4..ea54ec5 100755
--- a/autopeer_shell.py
+++ b/autopeer_shell.py
@@ -243,7 +243,7 @@ if __name__ == '__main__':
shell = AutopeerShell()
command = os.getenv('SSH_ORIGINAL_COMMAND', '')
if len(command):
- sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command} via {os.getenv('SSH_CONNECTION')}", text=True)
+ sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} ran {command!r} via {os.getenv('SSH_CONNECTION')}", text=True)
shell.onecmd(command)
else:
sp = subprocess.run(['socat', 'stdio', NOTIFY_TO], input=f"[autopeer {socket.gethostname()}] {USER} logged in via {os.getenv('SSH_CONNECTION')}", text=True)