Comment 27 for bug 1849753

Revision history for this message
Jesse Glick (jesse-glick) wrote :

I suspect this is also the cause of a problem affecting Krew plugins when using the kubectl snap (reported in https://github.com/corneliusweig/konfig/issues/14). To reproduce with the `kubectl` snap version 1.26.2 installed in classic confinement, create a file in `$PATH` named `kubectl-xxx`

---%<---
#!/usr/bin/env bash
set -ex
tmp=$(mktemp XXXXXX)
# Works:
echo hello >$tmp
cat $tmp
# Broken:
kubectl config view >$tmp
cat $tmp
--->%---

and try to use it:

---%<---
$ kubectl xxx
++ mktemp XXXXXX
+ tmp=rpbRXH
+ echo hello
+ cat rpbRXH
hello
+ kubectl config view
error: write /dev/stdout: permission denied
--->%---