mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
fix SSHClient.exec
This commit is contained in:
@@ -30,7 +30,6 @@ class DockerProvider extends BusyProvider {
|
||||
DockerErr? error;
|
||||
PwdRequestFunc? onPwdReq;
|
||||
String? hostId;
|
||||
String? runLog;
|
||||
bool isRequestingPwd = false;
|
||||
|
||||
void init(SSHClient client, String userName, PwdRequestFunc onPwdReq,
|
||||
@@ -44,7 +43,7 @@ class DockerProvider extends BusyProvider {
|
||||
void clear() {
|
||||
client = userName = error = items = version = edition = onPwdReq = null;
|
||||
isRequestingPwd = false;
|
||||
hostId = runLog = null;
|
||||
hostId = null;
|
||||
}
|
||||
|
||||
Future<void> refresh() async {
|
||||
@@ -124,14 +123,8 @@ class DockerProvider extends BusyProvider {
|
||||
final code = await client!.exec(
|
||||
_wrapHost(cmd),
|
||||
onStderr: _onPwd,
|
||||
onStdout: (data, _) {
|
||||
runLog = '$runLog$data';
|
||||
notifyListeners();
|
||||
},
|
||||
);
|
||||
|
||||
runLog = null;
|
||||
|
||||
if (code != 0) {
|
||||
setBusyState(false);
|
||||
return DockerErr(type: DockerErrType.unknown, message: errs.join('\n'));
|
||||
|
||||
Reference in New Issue
Block a user