diff options
author | 2017-05-17 18:06:54 -0700 | |
---|---|---|
committer | 2017-05-17 18:06:54 -0700 | |
commit | 64d283057b91f21ea98ac13af74435c9d9edb6ee (patch) | |
tree | 31859eec72559d268cc9b8e2a9d3fa2fe8fc3a44 /configure | |
parent | e5824d60f717e4aea40e11944873c1eb56cb994b (diff) |
Make .bazelrc import ~/.bazelrc (#9987)
When running ./configure for the first time, an import ~/.bazelrc statement
will be added to the generated .bazelrc if the user has one.
Fixes #9963
See also bazelbuild/bazel#3022
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -166,7 +166,13 @@ function setup_python { # This file contains customized config settings. rm -f .tf_configure.bazelrc touch .tf_configure.bazelrc -touch .bazelrc +if [[ ! -e .bazelrc ]]; then + if [[ -e "${HOME}/.bazelrc" ]]; then + echo "import ${HOME}/.bazelrc" >.bazelrc + else + touch .bazelrc + fi +fi sed_in_place "/tf_configure/d" .bazelrc echo "import %workspace%/.tf_configure.bazelrc" >> .bazelrc |