Show "Caching Options:" section when "cros chrome-sdk --help"
"cros chrome-sdk --help" doesn't show --cache-dir option despite the fact that it uses the option.
It also lists "--clear-sdk-cache" in "optional arguments" section and
it results in difficulty when trying to escape from error state caused by corrupted cache.
Move --clear-sdk-cache to "Caching Options" section.
Add use_caching_options to CrosCommand
Remove unused variable SUPPORTS_CACHING from BaseParser
BUG=None
TEST=cros chrome-sdk --help
Change-Id: I4f265fdfa3c7af11f3e8c12d3a154ccc92705076
Reviewed-on: https://chromium-review.googlesource.com/183299
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
diff --git a/scripts/cros.py b/scripts/cros.py
index 39af59c..45470a4 100644
--- a/scripts/cros.py
+++ b/scripts/cros.py
@@ -20,6 +20,7 @@
epilog = getattr(class_def, 'EPILOG', None)
sub_parser = subparsers.add_parser(
cmd_name, description=class_def.__doc__, epilog=epilog,
+ caching=class_def.use_caching_options,
formatter_class=commandline.argparse.RawDescriptionHelpFormatter)
class_def.AddParser(sub_parser)