mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-07-28 01:27:58 +00:00
fix: correct indentation in shell.go and updater.go for gci linter
This commit is contained in:
+5
-5
@@ -696,11 +696,11 @@ func (t *ExecTool) runBackground(ctx context.Context, command, cwd string, ptyEn
|
||||
}
|
||||
}
|
||||
|
||||
// All pipes closed, get exit status
|
||||
if stdinWriter != nil {
|
||||
_ = stdinWriter.Close()
|
||||
}
|
||||
cmd.Wait()
|
||||
// All pipes closed, get exit status
|
||||
if stdinWriter != nil {
|
||||
_ = stdinWriter.Close()
|
||||
}
|
||||
cmd.Wait()
|
||||
|
||||
session.mu.Lock()
|
||||
if cmd.ProcessState != nil {
|
||||
|
||||
+13
-13
@@ -574,19 +574,19 @@ func extractZip(archivePath, destDir string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out, err := os.OpenFile(target, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, f.FileInfo().Mode())
|
||||
if err != nil {
|
||||
_ = rc.Close()
|
||||
return err
|
||||
}
|
||||
if _, err := io.Copy(out, rc); err != nil {
|
||||
_ = rc.Close()
|
||||
_ = out.Close()
|
||||
return err
|
||||
}
|
||||
if err := rc.Close(); err != nil {
|
||||
_ = out.Close()
|
||||
return fmt.Errorf("close zip entry reader: %w", err)
|
||||
out, err := os.OpenFile(target, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, f.FileInfo().Mode())
|
||||
if err != nil {
|
||||
_ = rc.Close()
|
||||
return err
|
||||
}
|
||||
if _, err := io.Copy(out, rc); err != nil {
|
||||
_ = rc.Close()
|
||||
_ = out.Close()
|
||||
return err
|
||||
}
|
||||
if err := rc.Close(); err != nil {
|
||||
_ = out.Close()
|
||||
return fmt.Errorf("close zip entry reader: %w", err)
|
||||
}
|
||||
if err := out.Close(); err != nil {
|
||||
return fmt.Errorf("close extracted file %q: %w", target, err)
|
||||
|
||||
Reference in New Issue
Block a user