From b52ca641b6eae6f9ac85af367e47acda419d4002 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Tue, 24 Oct 2023 20:07:38 +0300 Subject: [PATCH] Better handling of paths --- deploy.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deploy.inc.php b/deploy.inc.php index 5b11a69..000a691 100644 --- a/deploy.inc.php +++ b/deploy.inc.php @@ -251,10 +251,11 @@ function deploy_put_file($name, $path, $contents, $opts = 0) { $decl = deploy_get_node($name); + $path = deploy_str($decl, $path); + foreach($decl->get('hosts') as $host) { $ssh = deploy_get_ssh($decl, $host, $opts); - $path = deploy_str($decl, $path); $scp = new SCP($ssh); if(($opts & DEPLOY_OPT_SILENT) == 0) echo "[PUT] $host: $path\n"; @@ -317,6 +318,8 @@ function deploy_scp_put_file_async($name, $local_path, $remote_path, $opts = 0) $decl = deploy_get_node($name); + $remote_path = deploy_str($decl, $remote_path); + $user = $decl->get('user'); $tmp_key_file = tempnam("/tmp", "ssh_");