dbssh: Fix optional command handling

This commit is contained in:
David Macek committed 2021-03-07 14:17:51 +01:00
1 parent e8ae60581b
commit 3742567427
1 file changed
+7 -1
+7 -1
View File
@@ -7,4 +7,10 @@ host=repo@msys2.appfleet.io
# remote_gpga_socket="$(ssh "${host}" -- gpgconf --list-dirs agent-socket)"
remote_gpga_socket="/home/repo/.gnupg/S.gpg-agent"
exec ssh -tt -A -R "${remote_gpga_socket}:$(gpgconf --list-dirs agent-extra-socket)" "${host}" -- bash -li "${@}"
if test "${#}" -eq 0
then
args=()
else
args=(bash -lc "'\"\$@\"'" bash)
fi
exec ssh -tt -A -R "${remote_gpga_socket}:$(gpgconf --list-dirs agent-extra-socket)" "${host}" -- "${args[@]}" "${@}"