Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2012 11:22:18 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244608 - head/usr.sbin/pkg
Message-ID:  <201212231122.qBNBMIXb081427@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: matthew (ports committer)
Date: Sun Dec 23 11:22:18 2012
New Revision: 244608
URL: http://svnweb.freebsd.org/changeset/base/244608

Log:
  Third time's the charm.  pkg -N output needs to go to stderr.
  
  Approved by:	bapt
  MFC after:	2 weeks

Modified:
  head/usr.sbin/pkg/pkg.c

Modified: head/usr.sbin/pkg/pkg.c
==============================================================================
--- head/usr.sbin/pkg/pkg.c	Sun Dec 23 10:21:01 2012	(r244607)
+++ head/usr.sbin/pkg/pkg.c	Sun Dec 23 11:22:18 2012	(r244608)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212231122.qBNBMIXb081427>