plugins
plugins copied to clipboard
Shared local config doesn't work with parent dir or unexpanded paths
I have a config like this:
version: 0.1
cli:
version: 1.22.2
plugins:
sources:
- id: trunk
ref: v1.6.1
uri: https://github.com/trunk-io/plugins
- id: skoti
local: ../shared
the ../shared
contains plugin.yaml
and it works.
However, it stops working as soon as I change the local path to either:
-
..
or../
- to simply indicate the parent directory -
~/configs/trunk
or$HOME/configs/trunk
- to point to the home directory via tilde expansion or env variable
Is this something that could/should be supported?
It works with ../shared
or absolute paths like: /Users/skoti/configs/trunk
so might be not worth adding.
If not then it should be fixed to return a proper error.
As ..
or ../
makes trunk
to hang for infinity ♾️ .
And the tilde expansion returns:
.trunk/trunk.yaml:9:7
9:7 high [skoti] '~/configs/trunk' does not exist trunk/config-error
Unable to run check due to invalid config
Which is not true because the file exists, so I would expect something like an unrecognized path error or if we can be specific unsupported path expansion.
Interestingly, if I put a symlink ../shared/plugin.yaml
to point to ~/configs/trunk/plugin.yaml
via tilde expansion then it works. So looks like only the configured path is significant.