From 3a6c4ab1b6fc79a6a543088553cdd6bc8cb0a1dd Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 21 May 2018 21:10:09 +0300 Subject: Adapt to inventing package_name type --- bpkg/pkg-status.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bpkg/pkg-status.cxx') diff --git a/bpkg/pkg-status.cxx b/bpkg/pkg-status.cxx index c5f74d9..8ca2ac7 100644 --- a/bpkg/pkg-status.cxx +++ b/bpkg/pkg-status.cxx @@ -19,7 +19,7 @@ namespace bpkg { struct package { - string name; + package_name name; bpkg::version version; // Empty if unspecified. shared_ptr selected; // NULL if none selected. optional constraint; // Version constraint, if any. @@ -129,7 +129,9 @@ namespace bpkg cout << '!'; } - cout << p.name; + // If the package name is selected, then print its exact spelling. + // + cout << (s != nullptr ? s->name : p.name); if (o.constraint () && p.constraint) cout << ' ' << *p.constraint; -- cgit v1.1