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 d4d66c9b0385bb..f36d77b2fc3ba7 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 @@ -1,4 +1,4 @@ -#!/bin/bash --posix +#!/usr/bin/env bash # Copyright 2014 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -44,6 +44,8 @@ # # The remainder of the command line is passed to the program. +set -o posix + # Make it easy to insert 'set -x' or similar commands when debugging problems with this script. eval "$JAVA_STUB_DEBUG"