Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NppExec - Command unkown to NppExec, Environment variable is set

I am trying to execute a small perl6 script via Notepad++ and NppExec. My system is Windows 10 and i set the PATH variable properly to C:\rakudo\bin where the perl6 executable is. When i am executing the script via normal console with:

perl6 "path/to/script.pl6" 

it gets executed without a problem.

However, when i execute the exact same command in NppExec as following:

CD $(CURRENT_DIRECTORY)
perl6 "$(FILE_NAME)"

i get the error: CreateProcess() failed with error code 2: The system cannot find the file specified.

Obviously, the command "perl6" is unkown to NppExec... My question: How can i make the PATH variable known to NppExec or is this problem related to something else?

like image 721
Plus Ultra Avatar asked Jun 16 '26 22:06

Plus Ultra


1 Answers

You can show the PATH that NppExec knows with the following NppExec command:

env_set PATH

So you can check if the path to perl is there or not. A rather simple way to run perl would be using the full path to perl6 in you original script. Btw, you can use $(FULL_CURRENT_PATH).

like image 108
Lars Fischer Avatar answered Jun 20 '26 01:06

Lars Fischer