git: b197d2abcb68 - main - sh: Fix non-NO_ROOT installconfig

From: Lexi Winter <ivy_at_FreeBSD.org>
Date: Tue, 02 Sep 2025 12:06:43 UTC
The branch main has been updated by ivy:

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

commit b197d2abcb6895d78bc9df8404e374397aa44748
Author:     Lexi Winter <ivy@FreeBSD.org>
AuthorDate: 2025-09-02 11:47:36 +0000
Commit:     Lexi Winter <ivy@FreeBSD.org>
CommitDate: 2025-09-02 11:47:36 +0000

    sh: Fix non-NO_ROOT installconfig
    
    When building without NO_ROOT, ${TAG_ARGS} is not set, which means we
    pass ",config" as an install(1) argument.  Only add the config tag if
    ${TAG_ARGS} is defined to begin with.
    
    Fixes:  aa730a66bc74 ("sh: Add config tag to /.profile")
    Reported by:    bz
---
 bin/sh/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 4dbbf344bfb5..916bb88b57fa 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -74,6 +74,6 @@ beforeinstallconfig:
 
 LINKMODE=${CONFMODE}
 afterinstallconfig:
-	${INSTALL_LINK} ${TAG_ARGS},config ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+	${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},config} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
 
 .include <bsd.prog.mk>