Skip to content

Commit

Permalink
feat(expandPath): the path beginning with ~ will be treat as $HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Aug 17, 2024
1 parent 8f705b4 commit e51fc16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/load-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ export function getXDGConfigs(config: Config) {
}

export function expandPath(path: string, config?: any) {
if (path.startsWith('~')) {
path = '$HOME' + path.slice(1)
}
const result = expandConfig(path, config)
return result
}

0 comments on commit e51fc16

Please # to comment.