kcl
kcl copied to clipboard
kcl ignores XDG directories
Bug Report
1. Minimal reproduce step (Required)
kcl init && kcl mod add k8s && ls ~/.kcl
2. What did you expect to see? (Required)
I'd expect kcl to create its data directory in ~/.local/share/kcl or $XDG_DATA_HOME/kcl if such env is defined.
3. What did you see instead (Required)
I see kcl creating directory directly in my home.
4. What is your KCL components version? (Required)
$ kcl --version
kcl version v0.11.0
you mean this https://specifications.freedesktop.org/basedir-spec/latest/? https://wiki.archlinux.org/title/XDG_Base_Directory
https://github.com/kcl-lang/lib/blob/main/go/path/home.go cc @He1pa @zong-zhe Related lib install home path code, we can move them to the XDG path. You can find the reference code in the Helm repo.