diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2017-07-31 15:57:51 +0200 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2017-07-31 16:32:21 +0200 |
commit | 1a06cb90e8a5bfd6134ed0a00f86cf73eb4cb60f (patch) | |
tree | ea354c25d4793ae2618c6e8671b01ff7c800e796 /src/main/java/com/google/devtools/build | |
parent | a4bfe16a12a0dbc72c3197d3ce0b3b6f8f1d8b87 (diff) |
Java launcher: export runfiles-related envvars
Otherwise these envvars are not available to the
Java program and it can't load its runfiles.
I tested that this is necessary both on Linux and
Windows.
Related to https://github.com/bazelbuild/bazel/issues/3264
Change-Id: I2bd8eee0793b26aeedeafc6900f7854c816b5b14
PiperOrigin-RevId: 163688341
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt index ba35a95e46..d5495c00b6 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt @@ -173,8 +173,9 @@ if is_windows; then JAVA_RUNFILES=$(cygpath --windows "$JAVA_RUNFILES") fi -RUNFILES_MANIFEST_FILE="${JAVA_RUNFILES}/MANIFEST" -RUNFILES_MANIFEST_ONLY=%runfiles_manifest_only% +export JAVA_RUNFILES +export RUNFILES_MANIFEST_FILE="${JAVA_RUNFILES}/MANIFEST" +export RUNFILES_MANIFEST_ONLY=%runfiles_manifest_only% if [ -z "$RUNFILES_MANIFEST_ONLY" ]; then function rlocation() { |