From 0c5c04755e21e029fb68423f37b96a6e1a3fbf84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu>
Date: Mon, 27 Apr 2020 09:11:51 +0200
Subject: [PATCH] api.R: read_conf: test for existence of fn_conf

* api.R (read_conf): Add a test.
---
 R/api.R | 1 +
 1 file changed, 1 insertion(+)

diff --git a/R/api.R b/R/api.R
index 79daaa3..dd7fa8e 100644
--- a/R/api.R
+++ b/R/api.R
@@ -25,6 +25,7 @@ run <- function(fn_conf) {
 }
 
 read_conf <- function(fn_conf) {
+    assertthat::assert_that(file.exists(fn_conf),msg=paste("Unable to read the configuration file:", fn_conf))
     conf <- yaml::yaml.load_file(fn_conf)
     conf <- vrfy_conf(conf)
     conf
-- 
GitLab