We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
pathlib.Path
1 parent e44439f commit f61084eCopy full SHA for f61084e
1 file changed
action.yml
@@ -38,7 +38,14 @@ runs:
38
import sys, os
39
import json
40
41
- with open("${{ github.action_path }}bin/resources.json", "r") as f:
+ json_file = "${{ github.action_path }}bin/resources.json"
42
+ try:
43
+ from pathlib import Path
44
+ json_file = str(Path(json_file).resolve())
45
+ except ImportError:
46
+ pass
47
+
48
+ with open(json_file, "r") as f:
49
json_content = json.load(f)
50
51
matching_versions = list(filter(lambda el: el["version"] == "${{ inputs.jython-version }}".strip(), json_content))
0 commit comments