`jython: command not found` on Windows-Powershell
Closed this issue · 3 comments
On Windows runners, the jython
command is recognised only when the job shell
is set to bash
, but fails when set to cmd
or pwsh
As the GitHub docs put, if your shell is bash
, you should use
echo "$HOME/.local/bin" >> $GITHUB_PATH
This will add /c/Users/runneradmin/.local/bin
to PATH
(even if on Windows runner), and PowerShell doesn't recognize this form of path.
For pwsh
, instead you should use
"$env:USERPROFILE/.local/bin" | Out-File -FilePath $env:GITHUB_PATH -Append
This will add C:\Users\runneradmin/.local/bin
, which is recognized by PowerShell but not bash.
Following is my test result.
This will add
C:\Users\runneradmin/.local/bin
, which is recognized by PowerShell but not bash.
Seems great!
Think you can provide a separate PR with only these changes?
I would like to postpone the Java PR for now, and this seems like a very quick and easy fix on your part😄
Maybe uncomment tests on powershell in the Github Action and let's see what happens...
OK, I'm working on it.
But there is another problem: the job "Run Jython (Bash)" also failed for version 2.0/2.1 on Windows because of "ClassNotFoundException: org.python.util.jython".
It may be caused by the wrong classpath separator, which should be ":" on Linux and ";" on Windows. As it seems that ":$CLASSPATH" is unnecesary, simply deleting it may help.