2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 11:27:17 +08:00

feat: 初步支持环境管理

This commit is contained in:
2026-01-07 01:20:08 +08:00
parent 9f52de654a
commit edadc9b045
41 changed files with 1301 additions and 745 deletions

View File

@@ -203,9 +203,7 @@ func ExecfWithTTY(shell string, args ...any) (string, error) {
if err != nil {
return "", fmt.Errorf("run %s failed", shell)
}
defer func(f *os.File) {
_ = f.Close()
}(f)
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)