| 220 | } |
| 221 | |
| 222 | std::optional<int> CommandLine::runPostApplication(MOApplication& a) |
| 223 | { |
| 224 | // handle -i with no arguments |
| 225 | if (m_vm.count("instance") && m_vm["instance"].as<std::string>() == "") { |
| 226 | env::Console c; |
| 227 | |
| 228 | if (auto i = InstanceManager::singleton().currentInstance()) { |
| 229 | std::cout << i->displayName().toStdString() << "\n"; |
| 230 | } else { |
| 231 | std::cout << "no instance configured\n"; |
| 232 | } |
| 233 | |
| 234 | return 0; |
| 235 | } |
| 236 | |
| 237 | if (m_command) { |
| 238 | return m_command->runPostApplication(a); |
| 239 | } |
| 240 | |
| 241 | return {}; |
| 242 | } |
| 243 | |
| 244 | std::optional<int> CommandLine::runPostMultiProcess(MOMultiProcess& mp) |
| 245 | { |
no test coverage detected