Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

RealCLanger
Copy link
Contributor

@RealCLanger RealCLanger commented Oct 23, 2020

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:

  • forge: patch for commit can be null
    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

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Reviewers

Download

$ git fetch https://git.openjdk.java.net/skara pull/916/head:pull/916
$ git checkout pull/916

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 23, 2020

👋 Welcome back clanger! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Oct 23, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 23, 2020

Webrevs

edvbld
edvbld approved these changes Oct 24, 2020
Copy link
Member

@edvbld edvbld left a comment

Looks good, thanks for fixing!

@openjdk
Copy link

@openjdk openjdk bot commented Oct 24, 2020

@RealCLanger This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

🔍 One or more changes in this pull request modifies files in areas of the source code that often require two reviewers. Please consider if this is the case for this pull request, and if so, await a second reviewer to approve this pull request before you integrate it.

🌎 Applicable reviewers for one or more changes in this pull request are spread across multiple different time zones. Please consider waiting with integrating this pull request until it has been out for review for at least 24 hours to give all reviewers a chance to review the pull request.

After integration, the commit message for the final commit will be:

Fix skara update on Windows when CWD is not skara repository dir

Reviewed-by: ehelin

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 master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

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.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Oct 24, 2020
@RealCLanger
Copy link
Contributor Author

@RealCLanger RealCLanger commented Oct 24, 2020

/integrate

@openjdk openjdk bot added the sponsor label Oct 24, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Oct 24, 2020

@RealCLanger
Your change (at version 475a52d) is now ready to be sponsored by a Committer.

@RealCLanger
Copy link
Contributor Author

@RealCLanger RealCLanger commented Oct 24, 2020

Looks good, thanks for fixing!

Thanks, Erik. In case everything looks good from your end, please sponsor :)

@rwestberg
Copy link
Member

@rwestberg rwestberg commented Oct 26, 2020

/sponsor

@openjdk
Copy link

@openjdk openjdk bot commented Oct 26, 2020

@rwestberg @RealCLanger Pushed as commit bd4cc7e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2020

@RealCLanger The command integrate can only be used in open pull requests.

3 similar comments
@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2020

@RealCLanger The command integrate can only be used in open pull requests.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2020

@RealCLanger The command integrate can only be used in open pull requests.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2020

@RealCLanger The command integrate can only be used in open pull requests.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 28, 2020

@rwestberg The command sponsor can only be used in open pull requests.

@RealCLanger RealCLanger deleted the fix-windows-update branch Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants