Skip to content

Fix compatibility issue for Windows (Issue#1).#4

Open
richc7 wants to merge 1 commit into
chriseppstein:masterfrom
richc7:patch-1
Open

Fix compatibility issue for Windows (Issue#1).#4
richc7 wants to merge 1 commit into
chriseppstein:masterfrom
richc7:patch-1

Conversation

@richc7

@richc7 richc7 commented Apr 22, 2015

Copy link
Copy Markdown

Replace "which" command with "where" for Windows instances. Fixes #1.

"By default, the search is done along the current directory and in the paths specified by the PATH environment variable" (from "where" command-line help). In some cases, this fails to find a Java installation located on a different drive than the drive from which the validator is being called. To counter this, this code adds a second "where" call with the C:\ path hard-coded should the default search path(s) fail. This hard-coded path should eventually be converted to a configuration value to allow override.

Tested successfully on Windows Server 2012 R2 Standard.

Replace "which" command with "where" for Windows instances. Fixes chriseppstein#1.

"By default, the search is done along the current directory and in the paths specified by the PATH environment variable" (from "where" command-line help). In some cases, this fails to find a Java installation located on a different drive than the drive from which the validator is being called. To counter this, this code adds a second "where" call with the C:\ path hard-coded should the default search path(s) fail. This hard-coded path should eventually be converted to a configuration value to allow override.

Tested successfully on Windows Server 2012 R2 Standard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

broken on windows

1 participant