From 96fb9608242254a1fc53bbd71168db4245458c8f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 24 Jun 2022 14:11:20 +0530 Subject: Send rapper output to /dev/null instead of using --ignore-errors. The --ignore-errors flag not only avoids printing triples, but also actually ignores errors. What a surprise! ;-) As a result, rapper does not stop invalid turtle files, and they end up erroring out when uploaded to virtuoso. * genenetwork-development.scm (dump-genenetwork-database): Send rapper output to /dev/null instead of using --ignore-errors. --- genenetwork-development.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 00f8927..1665b44 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -579,14 +579,15 @@ command to be executed." (invoke "./pre-inst-env" "./dump.scm" connection-settings-file dump-directory) - ;; Validate dumped RDF. - (invoke #$(file-append raptor2 "/bin/rapper") - "--input" "turtle" - "--count" - ;; We use --ignore-errors because we don't want to - ;; print out potentially sensitive data. - "--ignore-errors" - (string-append dump-directory "/dump.ttl")) + ;; Validate dumped RDF, sending the error output to + ;; oblivion because we don't want to print out potentially + ;; sensitive data. + (with-error-to-file "/dev/null" + (cut invoke + #$(file-append raptor2 "/bin/rapper") + "--input" "turtle" + "--count" + (string-append dump-directory "/dump.ttl"))) ;; Load RDF into virtuoso. (invoke "./pre-inst-env" "./load-rdf.scm" connection-settings-file -- cgit v1.2.3