From 2efaf0f219850cd02cc77cb41d6c1c1bdd9de6ba Mon Sep 17 00:00:00 2001
From: tv <tv@shackspace.de>
Date: Tue, 20 Oct 2015 20:06:17 +0200
Subject: [PATCH] populate dir: improve error message

---
 krebs/default.nix | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/krebs/default.nix b/krebs/default.nix
index c23cf152a..5e6595ced 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -221,11 +221,15 @@ let out = {
               ${config.path}/ \
               root@${target}:${config.target-path}
           '';
-          url = "file://${config.host.name}${config.path}";
+          current-url = "${current-user-name}@${current-host.name}";
+          source-url = "file://${config.host.name}${config.path}";
+          target-url = "root@${target}:${config.target-path}";
         in
         #if can-link then link-method else
         if can-push then push-method else
-        throw "cannot source ${url}";
+        throw
+          # /!\ revise this message when using more than just push-method
+          "No way to push ${source-url} from ${current-url} to ${target-url}";
 
       methods.git = config:
         rootssh target ''