Zsh treat unmatched glob as error while bash treat that as the original
string. Substitute globing with find to solve.
* config/profile.sh.in: Fix globing error for zsh
Signed-off-by: RocketDev <[email protected]>
---
config/profile.sh.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/config/profile.sh.in b/config/profile.sh.in
index 5e86f433..9f3e415a 100644
--- a/config/profile.sh.in
+++ b/config/profile.sh.in
@@ -6,12 +6,12 @@
prefix="@prefix@"
if [ -z "$DEBUGINFOD_URLS" ]; then
- DEBUGINFOD_URLS=$(cat /dev/null "@sysconfdir@/debuginfod"/*.urls
2>/dev/null | tr '\n' ' ' || :)
+ DEBUGINFOD_URLS=$(find "@sysconfdir@/debuginfod" -name "*.urls" -print0
2>/dev/null | xargs -0 cat 2>/dev/null | tr '\n' ' ' || :)
[ -n "$DEBUGINFOD_URLS" ] && export DEBUGINFOD_URLS || unset
DEBUGINFOD_URLS
fi
if [ -z "$DEBUGINFOD_IMA_CERT_PATH" ]; then
- DEBUGINFOD_IMA_CERT_PATH=$(cat /dev/null
"@sysconfdir@/debuginfod"/*.certpath 2>/dev/null | tr '\n' ':' || :)
+ DEBUGINFOD_IMA_CERT_PATH=$(find "@sysconfdir@/debuginfod" -name
"*.certpath" -print0 2>/dev/null | xargs -0 cat 2>/dev/null | tr '\n' ':' || :)
[ -n "$DEBUGINFOD_IMA_CERT_PATH" ] && export DEBUGINFOD_IMA_CERT_PATH ||
unset DEBUGINFOD_IMA_CERT_PATH
fi
unset prefix
--
2.47.0