Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5062 - Properly forward the --help flag to ruby/python scripts #5065

Merged
merged 2 commits into from
Jan 2, 2024

Commits on Dec 20, 2023

  1. Add test for #5062

    ```
    	3730 - OpenStudioCLI.execute_ruby_script.forward_flags.forward_help (Failed)
    	3731 - OpenStudioCLI.execute_python_script.forward_flags.forward_help (Failed)
    ```
    jmarrec committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    19cb730 View commit details
    Browse the repository at this point in the history
  2. Fix #5062 - Properly forward --help to the ruby/python scripts

    When script omitted, --help displays the C++ subcommand help
    
    ```
    $os_build_rel/Products/openstudio execute_ruby_script --help
    Executes a ruby file
    Usage: /Users/julien/Software/Others/OS-build-release/Products/openstudio execute_ruby_script [OPTIONS] path [args...]
    
    Positionals:
      path RUBY_SCRIPT                 Path to Ruby file
      args ARG ...                     Extra Arguments forwarded to the Ruby script
    
    Options:
      -h,--help                        Print this help message and exit
    
    Any additional arguments passed after the Ruby file are forwarded
    ```
    
    When --help is passed after the ruby script, the Ruby's script is displayed (if any):
    
    ```
    $os_build_rel/Products/openstudio execute_ruby_script execute_ruby_script_optparse_path.rb --help
    Usage: execute_ruby_script_optparse_path.rb -x building.xml
    
    The Ruby help description.
    
        -x, --xml <FILE>                 HPXML file
    ```
    jmarrec committed Dec 20, 2023
    Configuration menu
    Copy the full SHA
    a52f8e0 View commit details
    Browse the repository at this point in the history