mirror of
https://github.com/espressif/esp-idf
synced 2025-03-12 02:29:10 -04:00
Currently the wrapper tries to figure out which version of the esp-idf-size should be started. The legacy version is used if explicitly requested by the -l/--legacy option or if json format is specified. This works fine, but if help is requested, it is printed for the wrapper as shown bellow $ idf_size.py -h usage: idf_size.py [-h] [--format FORMAT] [-l] options: -h, --help show this help message and exit --format FORMAT -l, --legacy This is not convenient and the full help from the underlying version should be displayed. Fix this by only peeking into the args to figure out if legacy or refactored version should be started and always spawn the underlying esp_idf_size python module. This is done by using exit_on_error=False and add_help=False for the ArgumentParser. When help for refactored version is requested a note as following is printed to notify users that the legacy version can still be used. $ idf_size.py -h Note: legacy esp_idf_size version can be invoked by specifying the -l/--legacy option or by setting the ESP_IDF_SIZE_LEGACY environment variable. Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>