Skip to content

Commit

Permalink
Update distrobox-enter
Browse files Browse the repository at this point in the history
Catch only the lines with prefix we want.
  • Loading branch information
pavinjosdev committed Feb 20, 2024
1 parent 5b732d2 commit 2a423ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions distrobox-enter
Original file line number Diff line number Diff line change
Expand Up @@ -582,19 +582,19 @@ if [ "${container_status}" != "running" ]; then
# read logs from log_timestamp to now, line by line
while IFS= read -r line; do
case "${line}" in
*"Error:"*)
"Error:"*)
printf >&2 "\033[31m %s\n\033[0m" "${line}"
exit 1
;;
*"Warning:"*)
"Warning:"*)
printf >&2 "\n\033[33m %s\033[0m" "${line}"
;;
*"distrobox:"*)
"distrobox:"*)
current_line="$(echo "${line}" | cut -d' ' -f2-)"
# Save current line in the status, to avoid printing the same line multiple times
printf >&2 "\033[32m [ OK ]\n\033[0m%-40s\t" "${current_line}"
;;
*"container_setup_done"*)
"container_setup_done"*)
printf >&2 "\033[32m [ OK ]\n\033[0m"
kill "${logs_pid}" > /dev/null 2>&1
break 2
Expand Down

0 comments on commit 2a423ee

Please sign in to comment.