Skip to content

Commit

Permalink
fix: epm domain config file can be a symlink
Browse files Browse the repository at this point in the history
With v0.21.0, if the custom package domain file is a symbolic link
epm commands will fail with:

```text
=> No config file for domain 'my.custom.domain'
```

This may be the case if the file is managed by something like stow,
nix, or home-manager.

Fix by following symbolic links.

issue: #1833
  • Loading branch information
TrevorBender authored and xiaq committed Dec 31, 2024
1 parent 8b43b8e commit 8d0112c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mods/epm/epm.elv
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fn -write-domain-config {|dom|
fn -domain-config {|dom|
var cfgfile = (-domain-config-file $dom)
var cfg = $false
if (path:is-regular $cfgfile) {
if (path:is-regular &follow-symlink=$true $cfgfile) {
# If the config file exists, read it...
set cfg = (from-json < $cfgfile)
-debug "Read domain config for "$dom": "(to-string $cfg)
Expand Down

0 comments on commit 8d0112c

Please sign in to comment.