]> _ Git - cubist_util.git/commitdiff
wait #6668 @0:05
authorsoufiane <soufiane@cubedesigners.com>
Thu, 1 Feb 2024 15:47:11 +0000 (16:47 +0100)
committersoufiane <soufiane@cubedesigners.com>
Thu, 1 Feb 2024 15:47:11 +0000 (16:47 +0100)
src/CommandLine/LFTP.php

index c87e242c9e35f234d20bd02aec0d1188e209f101..2ed5b84fd6b90beea0afea3c2bac1025d1f8dee7 100644 (file)
@@ -60,9 +60,11 @@ class LFTP extends CloneUserpassProgram
             $filename = explode('/',$this->getSrc());
             $filename = end($filename);
             $commands = array_merge($commands, [
-                'put ' . $this->getSrc(),
-                'rm ' . $filename
+                'put ' . $this->getSrc()
             ]);
+            if ($this->isDryRun()) {
+                throw new \Exception("dry-run flag is incompatible for sending files");
+            }
         }
 
         $this->setArg('c', 'open ftp://'.$this->getUsername().':'.$this->getPassword().'@'.$this->getHost().':'.$this->getPort().' '.implode(';', $commands));