From fc50b25cec67498fb95f581703057327d44c19d8 Mon Sep 17 00:00:00 2001 From: Mahmoud Saada Date: Sun, 2 Aug 2026 12:45:41 -0400 Subject: [PATCH] Revert "Fix repeat command with odd-sized non-map outputs (#281)" This reverts commit ba99fdd7741bc670ed76fd78d2368d380a3ecd74. --- src/yetibot/core/commands/collections.clj | 7 ++----- test/yetibot/core/test/commands/collections.clj | 9 +-------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/yetibot/core/commands/collections.clj b/src/yetibot/core/commands/collections.clj index 2e89e5bd..030d113c 100644 --- a/src/yetibot/core/commands/collections.clj +++ b/src/yetibot/core/commands/collections.clj @@ -670,11 +670,8 @@ ;; - others return an error like {:result/error} ;; - others just return a plain value ;; so look for all 3 forms - values (map (fn [arg] - (if (map? arg) - (let [{:result/keys [value error]} arg] - (or value error arg)) - arg)) results) + values (map (fn [{:result/keys [value error] :as arg}] + (or value error arg)) results) data (map :result/data results) ] (info (pr-str (doall results))) diff --git a/test/yetibot/core/test/commands/collections.clj b/test/yetibot/core/test/commands/collections.clj index 0b00223e..2eff4a55 100644 --- a/test/yetibot/core/test/commands/collections.clj +++ b/test/yetibot/core/test/commands/collections.clj @@ -382,11 +382,4 @@ (fact "using 'unquote' collections command, it should always return 'foo\" bar'; pretty sure this is a bug :)" - value => "foo\" bar")) - - (let [{{:result/keys [value]} :result} - (ci/command-execution-info "repeat 2 range 5" - {:run-command? true})] - (fact - "using 'repeat' collections command on 'range 5' (an odd number of elements), it should succeed and not throw No value supplied" - value => [["0" "1" "2" "3" "4"] ["0" "1" "2" "3" "4"]]))) + value => "foo\" bar")))