Skip to content

Bad index file - timing issue #101

@MikaelElkiaer

Description

@MikaelElkiaer

Hi, love this tool and use it every day!

After adding a Vault KV2 store, I've started to sporadically seeing the following error:

$ switch
Error: could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'

It usually will occur after aborting a switch.
Below is an example - the Error: abort is caused by a <C-c> or <esc> key press.
After which I will just remove /home/me/.kube/switch-state/switch.filesystem.default.index and it will work again for some time.

$ cat ~/.kube/switch-state/switch.filesystem.default.index
kind: filesystem
contextToPathMapping:
  output/default: /home/me/Repositories/GitHub/org/helm-charts/charts/project/.debug/output/kubeconfig.yaml
$ switch
Error: abort
abort
$ switch
Error: could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
could not unmarshal index file with path '/home/me/.kube/switch-state/switch.filesystem.default.index': yaml: line 5: could not find expected ':'
$ cat ~/.kube/switch-state/switch.filesystem.default.index
kind: filesystem
contextToPathMapping:
  .kube/minikube: /home/me/.kube/config_minikube
rg/helm-charts/charts/project/.debug/output/kubeconfig.yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions