Skip to content

Commit 90215ef

Browse files
Benjschorgrunber
andauthored
Make Start Up Script compatible with older Python (#2569)
Previously the start up script created to be friendly to package managers used the `BooleanOptionalAction` in its argument parser. This feature is only available in Python 3.9 and later. Since the script shebang in jdtls indicates only Python3, this change updates the script to conform with that compatability. Co-authored-by: Roland Grunberg <[email protected]>
1 parent e8ae411 commit 90215ef

File tree

1 file changed

+2
-1
lines changed
  • org.eclipse.jdt.ls.product/scripts

1 file changed

+2
-1
lines changed

org.eclipse.jdt.ls.product/scripts/jdtls.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def main(args):
7070
jdtls_data_path = os.path.join(tempfile.gettempdir(), "jdtls-" + sha1(cwd_name.encode()).hexdigest())
7171

7272
parser = argparse.ArgumentParser()
73-
parser.add_argument("--validate-java-version", default=True, action=argparse.BooleanOptionalAction)
73+
parser.add_argument('--validate-java-version', action='store_true', default=True)
74+
parser.add_argument('--no-validate-java-version', dest='validate_java_version', action='store_false')
7475
parser.add_argument("--jvm-arg",
7576
default=[],
7677
action="append",

0 commit comments

Comments
 (0)