This is a temporary approach to handle runroot with migration to ArgParser. When all program use ArgParser, we can remove the runroot_handler below and replace it with this one.
| 152 | // This is a temporary approach to handle runroot with migration to ArgParser. |
| 153 | // When all program use ArgParser, we can remove the runroot_handler below and replace it with this one. |
| 154 | void |
| 155 | argparser_runroot_handler(std::string const &value, const char *executable, bool json) |
| 156 | { |
| 157 | // 1.if --run-root is provided |
| 158 | if (!value.empty()) { |
| 159 | std::string path = get_yaml_path(value); |
| 160 | if (!path.empty()) { |
| 161 | if (!json) { |
| 162 | ink_notice("using command line path as RUNROOT"); |
| 163 | } |
| 164 | runroot_file = path; |
| 165 | return; |
| 166 | } else if (!json) { |
| 167 | ink_warning("Unable to access runroot: '%s'", value.c_str()); |
| 168 | } |
| 169 | } |
| 170 | runroot_extra_handling(executable, json); |
| 171 | } |
| 172 | |
| 173 | // handler for ts runroot |
| 174 | // this function set up runroot_file |
no test coverage detected