From de3f5e697c8170888180e606991d1aaa9c6c3738 Mon Sep 17 00:00:00 2001 From: jank Date: Thu, 19 Jun 2025 17:20:17 +0200 Subject: [PATCH] fix: fix init script --- index.ts | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/index.ts b/index.ts index 72a1ffb..a8204a8 100644 --- a/index.ts +++ b/index.ts @@ -106,22 +106,13 @@ program program.command("init").action(() => { console.log(`${CLI_NAME}() { - local output - output=$(command ${CLI_NAME} "$@") - local exit_code=$? - - if [ $exit_code -eq 0 ]; then - echo "$output" | while IFS= read -r line; do - if [[ $line == __EXEC__* ]]; then - eval "\${line#__EXEC__}" - else - echo "$line" - fi - done - else - echo "$output" >&2 - return $exit_code - fi + command ${CLI_NAME} "$@" | while IFS= read -r line; do + if [[ $line == __EXEC__* ]]; then + eval "\${line#__EXEC__}" + else + echo "$line" + fi + done }`); });