summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/add/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_install/add/main.c')
-rw-r--r--usr.sbin/pkg_install/add/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/add/main.c b/usr.sbin/pkg_install/add/main.c
index d23f84b..8f09e06 100644
--- a/usr.sbin/pkg_install/add/main.c
+++ b/usr.sbin/pkg_install/add/main.c
@@ -173,7 +173,8 @@ main(int argc, char **argv)
pkgs[ch] = realpath(*argv, pkgnames[ch]);
else { /* look for the file in the expected places */
if (!(cp = fileFindByPath(NULL, *argv)))
- warnx("can't find package '%s'", *argv);
+ /* let pkg_do() fail later, so that error is reported */
+ pkgs[ch] = strcpy(pkgnames[ch], *argv);
else {
if (s_strlcpy(pkgnames[ch], cp, sizeof(pkgnames[ch])))
errx(1, "package name too long");
OpenPOWER on IntegriCloud