mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-22 08:00:53 +00:00
fix: Resolve deleted node status display issue (#9633)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user