From 4dbaed0d852d4b291c23a44fb98425f7e5222723 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 13 Nov 2020 17:23:09 +0300 Subject: Reorder bpkg_util_pkg_find_archive() result fields so optional ones go last --- bpkg-util/package-archive.bash.in | 4 ++-- tests/package-archive/testscript | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bpkg-util/package-archive.bash.in b/bpkg-util/package-archive.bash.in index 9400ade..899e3c4 100644 --- a/bpkg-util/package-archive.bash.in +++ b/bpkg-util/package-archive.bash.in @@ -132,7 +132,7 @@ function bpkg_util_pkg_find_archives_impl () # Search for a package archive in a directory using a file name pattern. If # the archive is found, then print the package information in the -# '\n\n\n' form, where the project field is +# '\n\n\n' form, where the project field is # empty if the project value is not specified in the manifest. # # Note that if there are multiple archives matching the pattern, then it is @@ -163,7 +163,7 @@ function bpkg_util_pkg_find_archive_impl () local p p=($(bpkg_util_pkg_verify_archive "$f")) - printf "${p[0]}\n${p[1]}\n${p[2]}\n$f" + printf "$f\n${p[0]}\n${p[1]}\n${p[2]}" return fi fi diff --git a/tests/package-archive/testscript b/tests/package-archive/testscript index 0cc93b2..b2eb7e3 100644 --- a/tests/package-archive/testscript +++ b/tests/package-archive/testscript @@ -118,10 +118,10 @@ clone_arcs = \ $clone_arcs; $* 'libhello-0.1.0.*' $~ >>:/"EOO" + $~/libhello-0.1.0.tar.gz libhello 0.1.0 hello - $~/libhello-0.1.0.tar.gz EOO } } -- cgit v1.1