mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 07:57:21 +08:00
fix: lint
This commit is contained in:
@@ -203,7 +203,9 @@ func ExecfWithTTY(shell string, args ...any) (string, error) {
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("run %s failed", shell)
|
||||
}
|
||||
defer f.Close()
|
||||
defer func(f *os.File) {
|
||||
_ = f.Close()
|
||||
}(f)
|
||||
|
||||
if _, err = io.Copy(&out, f); ptyError(err) != nil {
|
||||
return "", fmt.Errorf("run %s failed, out: %s, err: %w", shell, strings.TrimSpace(out.String()), err)
|
||||
|
||||
Reference in New Issue
Block a user