Skip to content

Commit 9251236

Browse files
ZZy979LukeSavefrogs
authored andcommitted
fix: wrong system path on Windows PowerShell; wrong classpath separator on Windows
1 parent ea13e3e commit 9251236

2 files changed

Lines changed: 23 additions & 18 deletions

File tree

.github/workflows/test-action.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ jobs:
3535
- "2.0"
3636

3737
# [GH-1] Jython 2.0 and 2.1 do not work on macOS and Ubuntu
38-
# exclude:
39-
# - os: ubuntu-latest
40-
# jython_version: "2.0"
41-
# - os: macos-latest
42-
# jython_version: "2.0"
43-
# - os: ubuntu-latest
44-
# jython_version: "2.1"
45-
# - os: macos-latest
46-
# jython_version: "2.1"
38+
exclude:
39+
- os: ubuntu-latest
40+
jython_version: "2.0"
41+
- os: macos-latest
42+
jython_version: "2.0"
43+
- os: ubuntu-latest
44+
jython_version: "2.1"
45+
- os: macos-latest
46+
jython_version: "2.1"
4747

4848
runs-on: ${{ matrix.os }}
4949
defaults:
@@ -80,8 +80,8 @@ jobs:
8080
echo "$output";
8181
echo "$output" | grep -q "Jython Works!";
8282
83-
# - name: Run Jython (Powershell)
84-
# shell: pwsh
85-
# if: ${{ runner.os == 'Windows' }}
86-
# run: |
87-
# jython -c 'import sys, os; print(os.name, sys.version); print "\n\nJython Works!\n\n"'
83+
- name: Run Jython (Powershell)
84+
shell: pwsh
85+
if: ${{ runner.os == 'Windows' }}
86+
run: |
87+
jython -c 'import sys, os; print(os.name, sys.version); print "\n\nJython Works!\n\n"'

action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ runs:
144144
mkdir -p ~/.local/bin;
145145
case "${{ steps.find_installer.outputs.file_type }}" in
146146
class)
147-
jython_cmd="java -verbose -Dpython.home='${installation_path}' -cp '${installation_path}/jython.jar:$CLASSPATH' org.python.util.jython \"\$@\""
147+
jython_cmd="java -verbose -Dpython.home='${installation_path}' -cp '${installation_path}/jython.jar' org.python.util.jython \"\$@\""
148148
;;
149149
150150
jar)
@@ -158,7 +158,12 @@ runs:
158158
echo ~/.local/bin >> $GITHUB_PATH
159159
# echo ${{ github.workspace }}/.local/bin >> $GITHUB_PATH
160160
161-
- name: Add to PATH
162-
shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
161+
- name: Add to PATH (Linux and macOS)
162+
if: runner.os != 'Windows'
163+
shell: bash
164+
run: echo ${HOME}/.local/bin >> $GITHUB_PATH
165+
- name: Add to PATH (Windows)
166+
if: runner.os == 'Windows'
167+
shell: pwsh
163168
run: |
164-
echo ${HOME}/.local/bin >> $GITHUB_PATH
169+
"$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

0 commit comments

Comments
 (0)