From a2ca12a4741dc5cb6ddfdbee3db77d7a7658b550 Mon Sep 17 00:00:00 2001 From: pvincent Date: Mon, 24 Aug 2026 22:18:19 +0400 Subject: [PATCH] fix miaou-exec HEREDOC_OR_PIPE --- tools/miaou-exec | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/miaou-exec b/tools/miaou-exec index e491342..1e9b320 100755 --- a/tools/miaou-exec +++ b/tools/miaou-exec @@ -41,15 +41,20 @@ function parse_options { done [[ ! -v CONTAINER ]] && usage && exit 1 if [[ -t 0 ]]; then - ((${#COMMAND_LINE[@]} == 0)) && usage && exit 2 + echo "${COMMAND_LINE[@]}" + echo "${#COMMAND_LINE[@]}" + if [[ "${#COMMAND_LINE[@]}" == 0 ]]; then + usage + builtin exit 2 + fi else - HEREDOC=true + HEREDOC_OR_PIPE=true fi } function exec { - if [[ -v HEREDOC ]]; then + if [[ -v HEREDOC_OR_PIPE ]]; then # TODO: test whether miaou-bash mounted within container script="miaou-bash <