From 5934c559f790975e0f7472aa2c4b45edc35c3629 Mon Sep 17 00:00:00 2001 From: Mathieu Longtin <87618701+mlongtin0@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:51:54 -0400 Subject: [PATCH 1/2] Fix errors when any of the variables have % in them --- bin/git-vendor | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/git-vendor b/bin/git-vendor index acbaf1d..2618673 100755 --- a/bin/git-vendor +++ b/bin/git-vendor @@ -138,12 +138,12 @@ cmd_list() if [ ! -z "$repository" ]; then if [ -z "$showOnly" -o "$showOnly" = "$name" ]; then - printf "$name@$ref:\n" - printf "\tname:\t$name\n" - printf "\tdir:\t$dir\n" - printf "\trepo:\t$repository\n" - printf "\tref:\t$ref\n" - printf "\tcommit:\t$commit\n" + printf "%s@%s:\n" "$name" "$ref" + printf "\tname:\t%s\n" "$name" + printf "\tdir:\t%s\n" "$dir" + printf "\trepo:\t%s\n" "$repository" + printf "\tref:\t%s\n" "$ref" + printf "\tcommit:\t%s\n" "$commit" printf "\n" fi fi From b3f136100c02d8a3e723888b6b5b3e11d95f6bde Mon Sep 17 00:00:00 2001 From: Mathieu Longtin <87618701+mlongtin0@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:47:55 -0500 Subject: [PATCH 2/2] Fix when repo URL has % in it --- bin/git-vendor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-vendor b/bin/git-vendor index 2618673..8917d69 100755 --- a/bin/git-vendor +++ b/bin/git-vendor @@ -41,7 +41,7 @@ fi # Simulate an associative array (for older versions of bash) var_name() { - printf "name_$1" | tr -c '[A-Za-z0-9]' '_' + echo "name_$1" | tr -c '[A-Za-z0-9]' '_' } vendor_names_from_log()