diff options
-rwxr-xr-x | kleaf/bazel.py | 10 | ||||
-rw-r--r-- | kleaf/tests/integration_test/integration_test.py | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/kleaf/bazel.py b/kleaf/bazel.py index ec2d1b0..9a87627 100755 --- a/kleaf/bazel.py +++ b/kleaf/bazel.py @@ -326,6 +326,9 @@ class BazelWrapper(KleafHelpPrinter): def _handle_bazelrc(self): """Rewrite bazelrc files.""" + if self.known_startup_options.help: + return + self.gen_bazelrc_dir = self.absolute_out_dir / "bazel/bazelrc" os.makedirs(self.gen_bazelrc_dir, exist_ok=True) @@ -370,10 +373,9 @@ class BazelWrapper(KleafHelpPrinter): build --//build/kernel/kleaf:cache_dir={shlex.quote(str(self.known_args.cache_dir))} """)) - if not self.known_startup_options.help: - self.transformed_startup_options += self._transform_bazelrc_files([ - cache_dir_bazelrc, - ]) + self.transformed_startup_options += self._transform_bazelrc_files([ + cache_dir_bazelrc, + ]) self.transformed_startup_options += self._transform_bazelrc_files([ # Toolchains and platforms diff --git a/kleaf/tests/integration_test/integration_test.py b/kleaf/tests/integration_test/integration_test.py index 28d5f85..f874d55 100644 --- a/kleaf/tests/integration_test/integration_test.py +++ b/kleaf/tests/integration_test/integration_test.py @@ -605,7 +605,6 @@ class QuickIntegrationTest(KleafIntegrationTestBase): self.assertNotIn("DECLARED_SET", stderr) self.assertNotIn("DECLARED_UNSET", stderr) - @unittest.skip("b/293357796") def test_dash_dash_help(self): """Test that `bazel --help` works.""" self._check_output("--help", [], use_bazelrc=False) |