   (let [lookup-fn #(pstore/lookup pstore tenant leafs-only limit-depth %
                                   exclude-paths)
         sidefx-wrapper (if sidefx-fn #(do (sidefx-fn %) %) #(do %))
-        sort (get-sort-or-not-fn sort-paths?)]
+        sort (get-sort-or-dummy-fn sort-paths?)]
     (sort (map :path (map sidefx-wrapper (flatten (map lookup-fn paths)))))))
 
 (defn- get-paths

      (dry-mode-warn options)
      (let [tpool (get-thread-pool options)
            pstore (pstore/elasticsearch-path-store es-url options)
            sort (get-sort-or-not-fn (:sort options))
            processed-data (process-metrics tenant rollups paths cass-hosts
                                            pstore options
                                            remove-obsolete-metrics-processor

  []
  (swap! inspecting? (fn [_] true)))

(defn- get-sort-or-dummy-fn
  "Get sort or dummy function."
  [sort?]
  (if sort? sort #(do %)))
