micro icon indicating copy to clipboard operation
micro copied to clipboard

Plugin directories can't be symlinks in linux.

Open agarrubio opened this issue 4 years ago • 4 comments

Plugin directories can't be symlinks in linux. This is a very non-linux behaviour!

Way to reproduce:

1) Clone plugins repo to a local directory
%> git clone https://github.com/micro-editor/updated-plugins.git

2) In micro's plug directory, make a link to one of those plugins (wc)
%> ln -s `/bin/readlink -f updated-plugins/micro-wc-plugin` $MICRO_CONFIG/plug

3) Add some mention to 'wc' in bindings.json:
    "F9": "lua:wc.wordCount"
    
4) Run micro:
# Lua Error: wc.wordCount does not exist

5) Delete the link and move the directory instead:
%> mv micro-wc-plugin $MICRO_CONFIG/plug

6) Run micro
# No Error. All happy!

Also tried with other plugins.

Specifications

Commit hash: Version: 2.0.8 Commit hash: cfcb2e45 Compiled on October 06, 2020

OS: Linux Mint Mate 19.1 64bit Terminal: LXTerminal and many others

agarrubio avatar Dec 19 '20 04:12 agarrubio

I ran into this too.

deliciouslytyped avatar Jan 13 '21 22:01 deliciouslytyped

In fact, this seems to be a recurring issue: In https://github.com/zyedidia/micro/issues/1733#issuecomment-646191337 they do exactly what I did.

There appears to have been a PR some years back that fixed something , but apparently it's broken again? https://github.com/zyedidia/micro/pull/469

deliciouslytyped avatar Jan 13 '21 22:01 deliciouslytyped

@zyedidia ping on this?

deliciouslytyped avatar Apr 11 '21 01:04 deliciouslytyped

Plugins were not detected if the directory is a symbolic link but the bug was fixed at 88e76b36 in 2.0.11.

niten94 avatar Jan 28 '24 02:01 niten94