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")))