summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg/pkg.c
diff options
context:
space:
mode:
authormatthew <matthew@FreeBSD.org>2012-12-23 11:22:18 +0000
committermatthew <matthew@FreeBSD.org>2012-12-23 11:22:18 +0000
commit2fa689448c705010b01e21d6af649719e9c9a2b8 (patch)
tree9a43337bd2e9135437510fa588e894fb014b9d59 /usr.sbin/pkg/pkg.c
parent6e16a54b036f00e2d50fc614de6284d23d560445 (diff)
downloadFreeBSD-src-2fa689448c705010b01e21d6af649719e9c9a2b8.zip
FreeBSD-src-2fa689448c705010b01e21d6af649719e9c9a2b8.tar.gz
Third time's the charm. pkg -N output needs to go to stderr.
Approved by: bapt MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/pkg/pkg.c')
-rw-r--r--usr.sbin/pkg/pkg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c
index aa8260b..485c08c 100644
--- a/usr.sbin/pkg/pkg.c
+++ b/usr.sbin/pkg/pkg.c
@@ -457,10 +457,8 @@ main(__unused int argc, char *argv[])
* a system is configured to use pkg, don't bootstrap pkg
* when that argument is given as argv[1].
*/
- if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0) {
- printf("%s", "pkg is not installed\n");
- exit(EXIT_FAILURE);
- }
+ if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0)
+ errx(EXIT_FAILURE, "pkg is not installed\n");
/*
* Do not ask for confirmation if either of stdin or stdout is
OpenPOWER on IntegriCloud