mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 16:54:08 +01:00
Merge pull request #23 from julienj/add-exceptions
throw exception for run, runLocally and uploadFile
This commit is contained in:
commit
8baaad93ce
@ -64,10 +64,9 @@ class Remote implements RemoteInterface
|
||||
$this->sftp->mkdir($dir, -1, true);
|
||||
$this->directories[$dir] = true;
|
||||
}
|
||||
$this->sftp->put($to, $from, NET_SFTP_LOCAL_FILE);
|
||||
|
||||
if($this->sftp->getSFTPErrors()) {
|
||||
throw new \RuntimeException(current($this->sftp->getSFTPErrors()));
|
||||
if(!$this->sftp->put($to, $from, NET_SFTP_LOCAL_FILE)) {
|
||||
throw new \RuntimeException(implode($this->sftp->getSFTPErrors(), "\n"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user