vim-raku icon indicating copy to clipboard operation
vim-raku copied to clipboard

perl6 error string is injected into path var

Open zostay opened this issue 5 years ago • 2 comments

Migration of https://github.com/vim-perl/vim-perl6/issues/19 by @ghost

Description of issue

ftplugin/perl6.vim executes a shell command when it's invoked without checking v:shell_error:

        if &shellxquote != '"'
            let perlpath = system('perl6 -e  "@*INC.join(q/,/).say"')
        else
            let perlpath = system("perl6 -e  '@*INC.join(q/,/).say'")
        endif

Whatever this was originally for, it's not valid code in current versions of rakudo:

$ perl6 -e '@*INC.join(q/,/).say' Dynamic variable @*INC not found in block at -e line 1 ...and this error text ends up in the value of :set path. I'm not sure what the original intent of this code was, but the thought that it's been executing random commands every time I open the editor on a perl6 file is a bit scary.

zostay avatar Jan 02 '20 22:01 zostay

I saw that when looking through the files initially and I have no idea what that is doing. I need to look at it more carefully and consider what should be done about.

zostay avatar Jan 02 '20 23:01 zostay

The offending code has been removed in #24, so I believe this issue can be closed.

softmoth avatar Mar 24 '21 04:03 softmoth