aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-status.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/pkg-status.cxx')
-rw-r--r--bpkg/pkg-status.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/bpkg/pkg-status.cxx b/bpkg/pkg-status.cxx
index c1cd12f..7894c49 100644
--- a/bpkg/pkg-status.cxx
+++ b/bpkg/pkg-status.cxx
@@ -32,18 +32,16 @@ namespace bpkg
fail << "package name argument expected" <<
info << "run 'bpkg help pkg-status' for more information";
- string n (args.next ());
+ const char* arg (args.next ());
+ string n (parse_package_name (arg));
+ version v (parse_package_version (arg));
- version v;
- if (args.more ())
- v = parse_version (args.next ());
+ level4 ([&]{trace << "package " << n << "; version " << v;});
database db (open (c, trace));
transaction t (db.begin ());
session s;
- level4 ([&]{trace << "package " << n << "; version " << v;});
-
// First search in the packages that already exist in this configuration.
//
shared_ptr<selected_package> p;