Skip to content

Commit 2c6c7e0

Browse files
committed
Fix grep -E pattern: use ERE alternation syntax (| instead of \|)
1 parent 345a4d2 commit 2c6c7e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

call_host.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ if [ -z "$APPTAINER_CONTAINER" ]; then
321321
# portable command list discovery:
322322
if command -v compgen >/dev/null 2>&1; then
323323
# bash: use compgen with grep pattern built from prefixes
324-
GREP_PATTERN="$(echo "$HOSTFN_PREFIXES" | sed 's/ /\\|^/g' | sed 's/^/^/')"
324+
GREP_PATTERN="$(echo "$HOSTFN_PREFIXES" | sed 's/ /|^/g' | sed 's/^/^/')"
325325
export APPTAINERENV_HOSTFNS=$(compgen -c | grep -E "$GREP_PATTERN" | tr '\n' ' ')
326326
else
327327
# fallback: scan PATH for matching executables (portable)

0 commit comments

Comments
 (0)