Skip to content

Commit 8794455

Browse files
authored
Merge pull request #4250 from thaJeztah/tininits
tini nits
2 parents 10bade2 + 2b7bfb3 commit 8794455

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

cli/command/container/hijack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (h *hijackedIOStreamer) setupInput() (restore func(), err error) {
8787
var restoreOnce sync.Once
8888
restore = func() {
8989
restoreOnce.Do(func() {
90-
restoreTerminal(h.streams, h.inputStream)
90+
_ = restoreTerminal(h.streams, h.inputStream)
9191
})
9292
}
9393

cli/command/image/build/context.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ func GetContextFromReader(rc io.ReadCloser, dockerfileName string) (out io.ReadC
161161
return nil, "", err
162162
}
163163

164-
tar, err := archive.Tar(dockerfileDir, archive.Uncompressed)
164+
tarArchive, err := archive.Tar(dockerfileDir, archive.Uncompressed)
165165
if err != nil {
166166
return nil, "", err
167167
}
168168

169-
return ioutils.NewReadCloserWrapper(tar, func() error {
170-
err := tar.Close()
169+
return ioutils.NewReadCloserWrapper(tarArchive, func() error {
170+
err := tarArchive.Close()
171171
os.RemoveAll(dockerfileDir)
172172
return err
173173
}), DefaultDockerfileName, nil
@@ -432,8 +432,7 @@ func Compress(buildCtx io.ReadCloser) (io.ReadCloser, error) {
432432
defer buildCtx.Close()
433433

434434
if _, err := pools.Copy(compressWriter, buildCtx); err != nil {
435-
pipeWriter.CloseWithError(
436-
errors.Wrap(err, "failed to compress context"))
435+
pipeWriter.CloseWithError(errors.Wrap(err, "failed to compress context"))
437436
compressWriter.Close()
438437
return
439438
}

0 commit comments

Comments
 (0)