| 825 | } |
| 826 | |
| 827 | void interactive_open_sandbox() |
| 828 | { |
| 829 | if (_client->get_chain()->get_is_in_sandbox()) |
| 830 | return; |
| 831 | |
| 832 | *_out << "The sandbox must be open to execute this command. You can:\n"; |
| 833 | *_out << "(o) Open the sandbox\n"; |
| 834 | *_out << "(q) Abort the command\n"; |
| 835 | |
| 836 | string choice = get_line("Choose [o/q]: "); |
| 837 | |
| 838 | if (choice == "o") |
| 839 | { |
| 840 | fc::istream_ptr argument_stream = std::make_shared<fc::stringstream>(); |
| 841 | try |
| 842 | { |
| 843 | parse_and_execute_interactive_command("sandbox_open", argument_stream); |
| 844 | } |
| 845 | catch (const thinkyoung::cli::abort_cli_command&) |
| 846 | { |
| 847 | } |
| 848 | } |
| 849 | else if (choice == "q") |
| 850 | { |
| 851 | FC_THROW_EXCEPTION(thinkyoung::cli::abort_cli_command, ""); |
| 852 | } |
| 853 | else |
| 854 | { |
| 855 | *_out << "Wrong answer!\n"; |
| 856 | } |
| 857 | } |
| 858 | |
| 859 | void format_and_print_result(const string& command, |
| 860 | const fc::variants arguments, |
no test coverage detected