mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #46608 from fabianofranz/fixes_kubectl_cache_on_windows
Automatic merge from submit-queue (batch tested with PRs 46552, 46608, 46390, 46605, 46459) Fixes kubectl cached discovery on Windows Fixes https://github.com/kubernetes/kubectl/issues/18 The `kubectl` cached discovery makes use of `func (f *File) Chmod(mode FileMode) error` which is not supported and errors out on Windows, making `kubectl get` and potentially a number of other commands to fail miserably on that platform. `os.Chmod` by file name, on the other hand, does not error out and should be used instead. **Release note**: ```release-note NONE ``` @deads2k @brendandburns @kubernetes/sig-cli-pr-reviews
This commit is contained in:
commit
a07298ce54
@ -196,7 +196,7 @@ func (d *CachedDiscoveryClient) writeCachedFile(filename string, obj runtime.Obj
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = f.Chmod(0755)
|
err = os.Chmod(f.Name(), 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user