New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix skara update on Windows when CWD is not skara repository dir #916
Conversation
|
@RealCLanger This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@edvbld) but any other Committer may sponsor as well.
|
/integrate |
@RealCLanger |
Thanks, Erik. In case everything looks good from your end, please sponsor :) |
/sponsor |
@rwestberg @RealCLanger Pushed as commit bd4cc7e. |
@RealCLanger The command |
3 similar comments
@RealCLanger The command |
@RealCLanger The command |
@RealCLanger The command |
@rwestberg The command |
On my windows client, I'm running in an issue when updating the skara tools. I see the following output/exception:
Checking for updates ...
Found the following updates:
Rebuilding ...
Exception in thread "main" java.io.IOException: Cannot run program "gradlew.bat" (in directory "C:\git\OpenJDK\skara"): CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at org.openjdk.skara.cli/org.openjdk.skara.cli.GitSkara.update(GitSkara.java:176)
at org.openjdk.skara.cli/org.openjdk.skara.cli.GitSkara.main(GitSkara.java:230)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:483)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 3 more
The issue seems to be that only "gradlew.bat" is added as command to the gradle call (https://github.com/openjdk/skara/blob/master/cli/src/main/java/org/openjdk/skara/cli/GitSkara.java#L168). The process directory is set to the skara repository directory. However, "gradlew.bat" isn't resolved against the working directory by Processbuilder, but probably only against the current %PATH%.
Currently, when running "git skara update" out of the skara repository path, it'll work.
With the proposed tiny fix to resolve gradlew.bat before starting the Processbuilder it can be run from any working directory.
Progress
Reviewers
Download
$ git fetch https://git.openjdk.java.net/skara pull/916/head:pull/916
$ git checkout pull/916