git: d7e3299f607f - main - Ensure good exit status from type

From: Simon J. Gerraty <sjg_at_FreeBSD.org>
Date: Sun, 23 Apr 2023 06:17:25 UTC
The branch main has been updated by sjg:

URL: https://cgit.FreeBSD.org/src/commit/?id=d7e3299f607fc2c58ec1f701c57402d39273b832

commit d7e3299f607fc2c58ec1f701c57402d39273b832
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2023-04-23 06:15:05 +0000
Commit:     Simon J. Gerraty <sjg@FreeBSD.org>
CommitDate: 2023-04-23 06:15:05 +0000

    Ensure good exit status from type
    
    When looking to see if nproc is available we do
    not want warnings about 'type nproc' having bad exit.
---
 share/mk/local.sys.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/mk/local.sys.mk b/share/mk/local.sys.mk
index 1aac5014b737..abcbf396c6b4 100644
--- a/share/mk/local.sys.mk
+++ b/share/mk/local.sys.mk
@@ -62,7 +62,7 @@ _PREMK_LIBDIR:=	${LIBDIR}
 .if make(*-jobs) && empty(JOB_MAX)
 # provide a reasonable? default for JOB_MAX based on ncpu
 JOB_MAX_FACTOR?= 1.33
-NPROC?= ${(type nproc) 2> /dev/null:L:sh:M/*:[1]}
+NPROC?= ${(type nproc || true) 2> /dev/null:L:sh:M/*:[1]}
 NPROC:= ${NPROC}
 .if !empty(NPROC)
 ncpu!= ${NPROC}