WSL: Fix fetching integrations

We were previously always checking the rancher-desktop distribution for
kubeconfig integration (which is completely useless).

Signed-off-by: Mark Yen <mark.yen@suse.com>
This commit is contained in:
Mark Yen
2021-10-07 16:04:44 -07:00
committed by David Cassany
parent 671835c159
commit 19d9f2087b

View File

@@ -1021,16 +1021,17 @@ export default class WSLBackend extends events.EventEmitter implements K8s.Kuber
try {
const kubeconfigPath = await this.k3sHelper.findKubeConfigToUpdate('rancher-desktop');
const stdout = await this.execCommand(
const stdout = await this.execWSL(
{
capture: true,
env: {
capture: true,
encoding: 'utf-8',
env: {
...process.env,
KUBECONFIG: kubeconfigPath,
WSLENV: `${ process.env.WSLENV }:KUBECONFIG/up`,
},
},
executable, 'kubeconfig', '--show');
'--distribution', distro, '--exec', executable, 'kubeconfig', '--show');
if (['true', 'false'].includes(stdout.trim())) {
result[distro] = stdout.trim() === 'true';