mirror of
https://github.com/rancher-sandbox/rancher-desktop.git
synced 2021-10-13 00:04:06 +03:00
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:
@@ -1020,16 +1020,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';
|
||||
|
||||
Reference in New Issue
Block a user