diff options
author | Kristina Chodorow <kchodorow@google.com> | 2016-03-03 17:16:45 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-03-04 12:16:12 +0000 |
commit | 00ed6fe756844f2bf841d17f843b2c3c5848e8cb (patch) | |
tree | 4a958a02014b8a3c5ed44d88c6d23049d0086469 /scripts/packages/template_bin.sh | |
parent | 47535789fb34a4fd144abe19152e5b662a1676a1 (diff) |
Only run `bazel help` if the user isn't root
Fixes #739.
--
MOS_MIGRATED_REVID=116257685
Diffstat (limited to 'scripts/packages/template_bin.sh')
-rwxr-xr-x | scripts/packages/template_bin.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/packages/template_bin.sh b/scripts/packages/template_bin.sh index e852fd5bfa..81ddc85e97 100755 --- a/scripts/packages/template_bin.sh +++ b/scripts/packages/template_bin.sh @@ -155,9 +155,6 @@ echo -n . ln -s "${base}/bin/bazel" "${bin}/bazel" echo -n . -# Uncompress the bazel base install for faster startup time -"${bin}/bazel" help >/dev/null - if [ -f "${bazelrc}" ]; then echo echo "${bazelrc} already exists, moving it to ${bazelrc}.bak." @@ -166,8 +163,11 @@ fi # Not necessary, but this way it matches the Debian package. touch "${bazelrc}" -if [ "${UID}" == 0 ]; then +if [ "${UID}" -eq 0 ]; then chmod 0644 "${bazelrc}" +else + # Uncompress the bazel base install for faster startup time + "${bin}/bazel" help >/dev/null fi echo . |