fix: correct indentation in shell.go and updater.go for gci linter
This commit is contained in:
parent
62a2b0015a
commit
7ee4ee3b64
2 changed files with 18 additions and 18 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue