Skip to content

Commit b76975e

Browse files
committed
fixes linux pathing
1 parent 45bfd83 commit b76975e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

private/Alias-Helper.ps1

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
$aliases = @()
44

5-
$ALIAS_FILE_RELATIVE_PATH = 'quickpath\aliases.json'
6-
75
function Get-AliasFilePath {
8-
if($IsWindows) {
9-
$baseDir = $env:LOCALAPPDATA
6+
if ($IsWindows) {
7+
$baseDir = $env:LOCALAPPDATA ?? (Join-Path $env:USERPROFILE "AppData\Local")
108
} else {
11-
# Use XDG Base Directory specification on Linux/macOS
129
$baseDir = $env:XDG_DATA_HOME ?? (Join-Path $HOME ".local/share")
1310
}
1411

15-
return Join-Path $baseDir $ALIAS_FILE_RELATIVE_PATH
12+
return Join-Path $baseDir "quickpath" "aliases.json"
1613
}
1714

1815
function Import-Aliases {

0 commit comments

Comments
 (0)