Switch from 'pkg -n' to 'pkg -N' as the test for pkgn activation

status. '-n' is already used extensively elsewhere in pkgng (to mean
'dry-run') and this reduces the potential confusion

Submitted by:	eadler
Approved by:	bapt
MFC after:	2 weeks
This commit is contained in:
Matthew Seaman 2012-12-22 15:13:16 +00:00
parent efec959c2c
commit d482e1f4a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=244594

View File

@ -453,11 +453,11 @@ main(__unused int argc, char *argv[])
if (access(pkgpath, X_OK) == -1) {
/*
* To allow 'pkg -n' to be used as a reliable test for whether
* To allow 'pkg -N' to be used as a reliable test for whether
* 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) {
if ( argv[1] != NULL && strcmp(argv[1], "-N") == 0) {
printf("%s", "pkg is not installed\n");
exit(EXIT_FAILURE);
}