Skip to content

Commit

Permalink
assemble: fix init_hooks regex for separator detection, Fix #1227
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <[email protected]>
  • Loading branch information
89luca89 committed Feb 25, 2024
1 parent e41ea11 commit 448986a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distrobox-assemble
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ run_distrobox() (

# Prepare for the next line, if we already have a ';' or '&&', do nothing
# else prefer adding '&&'
if ! echo "${arg}" | grep -q ';[[:space:]]\{0,1\}$' &&
! echo "${arg}" | grep -q '&&[[:space:]]\{0,1\}$'; then
if ! echo "${arg}" | grep -qE ';[[:space:]]{0,1}$' &&
! echo "${arg}" | grep -qE '&&[[:space:]]{0,1}$'; then
separator="&&"
else
separator=""
Expand All @@ -323,8 +323,8 @@ run_distrobox() (

# Prepare for the next line, if we already have a ';' or '&&', do nothing
# else prefer adding '&&'
if ! echo "${arg}" | grep -E ';[[:space:]]\{0,1\}$' &&
! echo "${arg}" | grep -E '&&[[:space:]]\{0,1\}$'; then
if ! echo "${arg}" | grep -qE ';[[:space:]]{0,1}$' &&
! echo "${arg}" | grep -qE '&&[[:space:]]{0,1}$'; then
separator="&&"
else
separator=""
Expand Down

0 comments on commit 448986a

Please sign in to comment.