From 19aac59bdc065eb7c7dd30c5888f46e0789121e8 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 28 Sep 2021 12:54:48 -0300 Subject: [PATCH] Avisar cuando no hay ssh-agent --- haini.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/haini.sh b/haini.sh index 9ff2c0e..38ec411 100755 --- a/haini.sh +++ b/haini.sh @@ -235,11 +235,15 @@ if test "$HAIN_ENV"; then ${*:-$DEFAULT} else if test -z "${SSH_AUTH_SOCK}"; then - SSH_ADHOC=true + if ! type ssh-agent >/dev/null 2>&1 ; then + echo "Instala ssh-agent para poder trabajar con git remoto dentro de haini.sh" >&2 + else + SSH_ADHOC=true - echo "Iniciando un ssh-agent temporal, te recomendamos instalarlo en tu terminal." >&2 - eval "$(ssh-agent)" - ssh-add + echo "Iniciando un ssh-agent temporal, te recomendamos instalarlo en tu terminal." >&2 + eval "$(ssh-agent)" + ssh-add + fi fi crear_entorno