mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-05 13:04:28 +08:00
fix: Resolve deleted node status display issue (#9633)
This commit is contained in:
parent
0cfdf0f335
commit
0daf0d690c
1 changed files with 3 additions and 0 deletions
|
@ -56,6 +56,9 @@ func NewClient(c ConnInfo) (*SSHClient, error) {
|
|||
return nil, err
|
||||
}
|
||||
sshClient := &SSHClient{Client: client}
|
||||
if c.User == "root" {
|
||||
return sshClient, nil
|
||||
}
|
||||
if _, err := sshClient.Run("sudo -n ls"); err == nil {
|
||||
sshClient.SudoItem = "sudo"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue