docToolchain / docToolchain/docToolchain

Docs: Feedback for 'Self-Contained docToolchain' - local tasks

Open
#1,275 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Groovy
Stars
864
Forks
240
Avg merge
2m
Merged PRs (30d)
2

Description

Hello the way the ps1 is doing the java version calculation does not work in windows.
This makes the command .dtwc local tasks to fail on the dtcw.ps1.

1. the command being used java -version -> Is not working the correct is java --version
`# We got a Java version
$javaversion = ((Invoke-Expression -Command "$JAVA_CMD -version 2>&1"`

2. the output is parsed incorrectly

Current output of java version
"
Java 17.0.8 2023-07-18 LTS
Java(TM) SE Runtime Environment (build 17.0.8+9-LTS-211)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.8+9-LTS-211, mixed mode, sharing)
"

Parsing rules:
$javaversion = ((Invoke-Expression -Command "$JAVA_CMD --version 2>&1" | Select-String -Pattern 'version').Line | Select-Object -First 1 ).Split('"')[1].Split(".")[0]

There is no patter as 'version'. Result is null

---
#page: https://github.com/doctoolchain/doctoolchain/edit/ng/src/docs/020_tutorial/120_self-contained-dtc.adoc
#branch: ng

Contributor guide

Open the contributing guide

Research direction

Start with the self-contained docToolchain page at docs/020_tutorial/120_self-contained-dtc.adoc and the referenced dtcw.ps1 logic for .dtcw local tasks. Check the Windows Java version command and parsing against the shown Java output; done means the local tasks command can determine the Java version successfully on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, powershell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.