From 72e50df2bc77b281ad328cb694047d3d1bb96f6c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 14 Mar 2021 06:01:15 +0100 Subject: [PATCH] Fix repository detection --- scripts/ynh_install_nodejs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ynh_install_nodejs b/scripts/ynh_install_nodejs index e585a40..9df53a4 100644 --- a/scripts/ynh_install_nodejs +++ b/scripts/ynh_install_nodejs @@ -120,7 +120,7 @@ ynh_install_nodejs () { if [ -n "$nodenv" ]; then ynh_print_info --message="nodenv already seems installed in \`$nodenv'." pushd "${nodenv%/*/*}" - if git remote -v 2>/dev/null | grep -q nodenv; then + if git remote -v 2>/dev/null | grep "https://github.com/nodenv/nodenv.git"; then echo "Trying to update with git..." git pull -q --tags origin master cd .. @@ -143,7 +143,7 @@ ynh_install_nodejs () { if [ -n "$node_build" ]; then ynh_print_info --message="\`nodenv install' command already available in \`$node_build'." pushd "${node_build%/*/*}" - if git remote -v 2>/dev/null | grep -q node-build; then + if git remote -v 2>/dev/null | grep "https://github.com/nodenv/node-build.git"; then ynh_print_info --message="Trying to update nodenv with git..." git pull -q origin master fi @@ -158,7 +158,7 @@ ynh_install_nodejs () { if [ -n "$nodenv_alias" ]; then ynh_print_info --message="\`nodenv alias' command already available in \`$nodenv_alias'." pushd "${nodenv_alias%/*/*}" - if git remote -v 2>/dev/null | grep -q nodenv-aliases; then + if git remote -v 2>/dev/null | grep "https://github.com/nodenv/nodenv-aliases.git"; then ynh_print_info --message="Trying to update nodenv-aliases with git..." git pull -q origin master fi @@ -173,7 +173,7 @@ ynh_install_nodejs () { if [ -n "$nodenv_latest" ]; then ynh_print_info --message="\`nodenv latest' command already available in \`$nodenv_latest'." pushd "${nodenv_latest%/*/*}" - if git remote -v 2>/dev/null | grep -q xxenv-latest; then + if git remote -v 2>/dev/null | grep "https://github.com/momo-lab/xxenv-latest.git"; then ynh_print_info --message="Trying to update xxenv-latest with git..." git pull -q origin master fi