kcl icon indicating copy to clipboard operation
kcl copied to clipboard

kcl ignores XDG directories

Open vlada-dudr opened this issue 10 months ago • 2 comments

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

vlada-dudr avatar Feb 25 '25 19:02 vlada-dudr

you mean this https://specifications.freedesktop.org/basedir-spec/latest/? https://wiki.archlinux.org/title/XDG_Base_Directory

He1pa avatar Feb 28 '25 03:02 He1pa

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.

Peefy avatar Mar 01 '25 04:03 Peefy