mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-24 11:01:26 +00:00
Merge pull request #48871 from wanghaoran1988/do_not_close_stdin
Automatic merge from submit-queue (batch tested with PRs 48914, 48535, 49099, 48935, 48871) do not close os.Stdin manually **What this PR does / why we need it**: We don't need close os.Stdin manually, it will block our read from stdin after finish the visit. **Special notes for your reviewer**: **Release note**: ``` None ```
This commit is contained in:
commit
32580b89b1
@ -487,11 +487,12 @@ func (v *FileVisitor) Visit(fn VisitorFunc) error {
|
||||
f = os.Stdin
|
||||
} else {
|
||||
var err error
|
||||
if f, err = os.Open(v.Path); err != nil {
|
||||
f, err = os.Open(v.Path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// TODO: Consider adding a flag to force to UTF16, apparently some
|
||||
// Windows tools don't write the BOM
|
||||
|
Loading…
Reference in New Issue
Block a user