Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 7b3fa67

Browse files
committed
Hack around extra quotes in Windows build-version file
I accidentally added quotes in the build-version file in Windows builds. Add a hack to remove them so we can use the 1.9.0 binaries.
1 parent 6695876 commit 7b3fa67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ if (!BUILD_VERSION_FILE.isFile()) {
2929
"Cannot find ${BUILD_VERSION_FILE}. " +
3030
"Make sure LIBTORCH_HOME refers to the root of the libtorch distribution.");
3131
}
32-
def installedVersion = BUILD_VERSION_FILE.readLines();
32+
def installedVersion = BUILD_VERSION_FILE.readLines()[0].replace("\"", "");
3333
def versionPattern = "^" + java.util.regex.Pattern.quote(LIBTORCH_VERSION) + "\\b.*";
34-
if (!USE_NIGHTLY && !(installedVersion[0] ==~ versionPattern)) {
34+
if (!USE_NIGHTLY && !(installedVersion ==~ versionPattern)) {
3535
throw new RuntimeException(
3636
"Found libtorch version ${installedVersion}, but build.gradle expects ${LIBTORCH_VERSION}.");
3737
}

0 commit comments

Comments
 (0)