Adding composer deps; Better PHPStan support
This commit is contained in:
parent
19cf44eb3f
commit
2427e5b434
|
@ -0,0 +1 @@
|
|||
tags
|
|
@ -5,9 +5,10 @@
|
|||
"require": {
|
||||
"php": ">=7.4",
|
||||
"amphp/amp" : "~v2.6.2",
|
||||
"amphp/process" : "~v1.1.4",
|
||||
"phpseclib/phpseclib" : "~2.0.30"
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": ["deploy.inc.php"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
namespace taskman;
|
||||
use Exception;
|
||||
use Amp;
|
||||
use Amp\Process;
|
||||
use phpseclib\Crypt\RSA;
|
||||
use phpseclib\Net\SSH2;
|
||||
use phpseclib\Net\SCP;
|
||||
|
@ -146,6 +148,7 @@ function deploy_node_host_exec($decl, $host, SSH2 $ssh, $cmd, &$status, $opts =
|
|||
return false;
|
||||
});
|
||||
$status = $ssh->getExitStatus();
|
||||
// @phpstan-ignore-next-line
|
||||
if($res === false)
|
||||
throw new Exception("Fatal error executing($status): $cmd");
|
||||
if(($opts & DEPLOY_OPT_ERR_OK) == 0 && $status !== 0)
|
||||
|
|
Loading…
Reference in New Issue