From: Jean Privat Date: Thu, 9 Jul 2015 17:16:21 +0000 (-0400) Subject: nitiwiki: error on --rsync if wiki.rsync_dir is not configured X-Git-Tag: v0.7.7~32^2~3 X-Git-Url: http://nitlanguage.org?ds=sidebyside nitiwiki: error on --rsync if wiki.rsync_dir is not configured Signed-off-by: Jean Privat --- diff --git a/contrib/nitiwiki/src/wiki_base.nit b/contrib/nitiwiki/src/wiki_base.nit index 6d7718b..998e47e 100644 --- a/contrib/nitiwiki/src/wiki_base.nit +++ b/contrib/nitiwiki/src/wiki_base.nit @@ -51,6 +51,10 @@ class Nitiwiki fun sync do var root = expand_path(config.root_dir, config.out_dir) var rsync_dir = config.rsync_dir + if rsync_dir == "" then + message("Error: configure `wiki.rsync_dir` to use rsync.", 0) + return + end sys.system "rsync -vr --delete -- {root.escape_to_sh}/ {rsync_dir.escape_to_sh}" end