Skip to content

Commit 20c7f64

Browse files
committed
feat(cli): when getting config, home directory follows linux standard
- fix by PR - 'XDG_CONFIG_HOME' applied
1 parent 3ec955f commit 20c7f64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cli/src/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ export interface Config {
4646

4747
export async function loadConfig(): Promise<Config> {
4848
const currentDir = Deno.cwd();
49-
const homeDir = Deno.env.get("HOME");
49+
50+
// for more details, see https://wiki.archlinux.org/title/XDG_Base_Directory
51+
const homeDir = Deno.env.get("XDG_CONFIG_HOME") ??
52+
`${Deno.env.get("HOME")}/.config`;
5053

5154
// search config file in current directory, priority arrays
5255
const paths = [

0 commit comments

Comments
 (0)