diff options
author | matthew <matthew@FreeBSD.org> | 2012-12-23 11:22:18 +0000 |
---|---|---|
committer | matthew <matthew@FreeBSD.org> | 2012-12-23 11:22:18 +0000 |
commit | 2fa689448c705010b01e21d6af649719e9c9a2b8 (patch) | |
tree | 9a43337bd2e9135437510fa588e894fb014b9d59 | |
parent | 6e16a54b036f00e2d50fc614de6284d23d560445 (diff) | |
download | FreeBSD-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
-rw-r--r-- | usr.sbin/pkg/pkg.c | 6 |
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 |