jack-karamanian/perl-syntax

Perl in WSL

nachomahn opened this issue · 1 comments

I use Windows Subsystem for Linux for my Perl install because Strawberry and Activeperl won't compile my code without much drama. Unfortunately there is no supportable way to do this with any of the syntax highlighter extensions for VSCode.

Yours, through a quirk of having -c as the first argument passed to the spawn(), lets me do this in the settings:

  "perlSyntax.perlExecutable": "bash",
  "perlSyntax.additionalOptions": ["/usr/bin/perl -I local/lib/perl5 -c"]

Obviously not ideal, and the other settings like perlSyntax.includePaths do not work. A way to support this better would be super handy. Maybe think of Carton support as well.

Thanks!

I think this can be fixed by adding { shell: true } to the options of the call to spawn.
That should allow a value of perlSyntax.perlExecutable to be something like bash -c perl or wsl perl, with any other arguments specified by perlSyntax.includePaths and perlSyntax.additionalOptions.

This change has been made in 57de815, and I have found it to work on Windows with the aforementioned values of perlSyntax.perlExecutable. I will test this tomorrow on other platforms just to be sure nothing is broken.

Thanks for reporting this issue!