summaryrefslogtreecommitdiff
path: root/guix/scripts/copy.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-07-03 23:17:29 +0200
committerLudovic Courtès <ludo@gnu.org>2017-07-03 23:51:23 +0200
commitcc1dfc202f2fefb6c2eb9467d1fc90a9154550c9 (patch)
tree0805d57c85e81d9928779195974bf5effc445920 /guix/scripts/copy.scm
parentd5ec5ed7197d121130af6953378bcfd8929a9754 (diff)
downloadguix-patches-cc1dfc202f2fefb6c2eb9467d1fc90a9154550c9.tar
guix-patches-cc1dfc202f2fefb6c2eb9467d1fc90a9154550c9.tar.gz
copy: Default to port 22.
Failing to do that, "%p" would be "0" when using "ProxyCommand" in ~/.ssh/config. * guix/scripts/copy.scm (send-to-remote-host): Default to port 22. (retrieve-from-remote-host): Likewise.
Diffstat (limited to 'guix/scripts/copy.scm')
-rw-r--r--guix/scripts/copy.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm
index 45f7cbbad5..32438b99d9 100644
--- a/guix/scripts/copy.scm
+++ b/guix/scripts/copy.scm
@@ -75,7 +75,8 @@ package names, build the underlying packages before sending them."
(and (or (assoc-ref opts 'dry-run?)
(build-derivations local drv))
- (let* ((session (open-ssh-session host #:user user #:port port))
+ (let* ((session (open-ssh-session host #:user user
+ #:port (or port 22)))
(sent (send-files local items
(connect-to-remote-daemon session)
#:recursive? #t)))
@@ -88,7 +89,7 @@ package names, build the underlying packages before sending them."
(let*-values (((user host port)
(ssh-spec->user+host+port source))
((session)
- (open-ssh-session host #:user user #:port port))
+ (open-ssh-session host #:user user #:port (or port 22)))
((remote)
(connect-to-remote-daemon session)))
(set-build-options-from-command-line local opts)