diff --git a/msys2-dbssh b/msys2-dbssh index 5d1061e..e141955 100755 --- a/msys2-dbssh +++ b/msys2-dbssh @@ -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[@]}" "${@}"