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 }`); });