Fails hard when db is invalid and doesn't respect --catch-validation-errors
@@ -35,7 +35,7 @@
(if diff
(do (println "The exported EDN's have the following diff:")
(pprint/pprint diff)
- (js/process.exit 1))
+ (when-not catch-validation-errors? (js/process.exit 1)))
(println "The exported EDN roundtrips successfully!"))))))
(defn- local-export [{{:keys [graph validate roundtrip] :as options} :opts}]
@@ -1119,7 +1119,8 @@
(do
(js/console.error "Exported EDN has the following invalid errors when imported into a new graph:")
(pprint/pprint errors)
- {:error (str "The exported EDN has " (count errors) " validation error(s)")})
+ {:error (str "The exported EDN has " (count errors) " validation error(s)")
+ :db @import-conn})
{:db @import-conn}))
(catch :default e
(js/console.error "Unexpected export-edn validation error:" e)