eos
eos copied to clipboard
nodeos --config doesn't support path with whitespace on Mac
./programs/nodeos/nodeos --config=/Users/antonperkov/Library/Application\ Support/eosio.rel/nodeos/config/config.ini -d /Users/antonperkov/Library/Application\ Support/eosio.rel/ --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::account_history_api_plugin --resync
fails with
140142ms thread-0 main.cpp:97 main ] Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >
std::exception::what: the argument ('/Users/antonperkov/Library/Application Support/eosio.rel/nodeos/config/config.ini') for option '--config' is invalid
stacktrace:
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00007fff7304d1f4 libc++abi.dylib`__cxa_throw
frame #1: 0x00000001000f23e2 nodeos`void boost::throw_exception<boost::bad_lexical_cast>(e=0x00007ffeefbfa068) at throw_exception.hpp:69
frame #2: 0x000000010033e77f nodeos`void boost::conversion::detail::throw_bad_cast<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, boost::filesystem::path>() at bad_lexical_cast.hpp:92
frame #3: 0x000000010033e68a nodeos`boost::filesystem::path boost::lexical_cast<boost::filesystem::path, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(arg="/Users/antonperkov/Library/Application Support/eosio.rel/nodeos/config/config.ini") at lexical_cast.hpp:42
frame #4: 0x000000010033e525 nodeos`void boost::program_options::validate<boost::filesystem::path, char>(v=0x00000001076127e8, xs=size=1, (null)=0x0000000000000000, (null)=0) at value_semantic.hpp:92
frame #5: 0x000000010033e04e nodeos`boost::program_options::typed_value<boost::filesystem::path, char>::xparse(this=0x0000000107612620, value_store=0x00000001076127e8, new_tokens=size=1) const at value_semantic.hpp:184
frame #6: 0x00000001018f1119 nodeos`boost::program_options::store(options=0x00007ffeefbfaae0, xm=0x00007ffeefbfab08, utf8=<unavailable>) at variables_map.cpp:81 [opt]
frame #7: 0x00000001000341a8 nodeos`appbase::application::initialize_impl(this=0x0000000102fb9170, argc=11, argv=0x00007ffeefbff980, autostart_plugins=size=4) at application.cpp:107
frame #8: 0x0000000100012243 nodeos`bool appbase::application::initialize<eosio::chain_plugin, eosio::http_plugin, eosio::net_plugin, eosio::producer_plugin>(this=0x0000000102fb9170, argc=11, argv=0x00007ffeefbff980) at application.hpp:62
frame #9: 0x000000010000a4d1 nodeos`main(argc=11, argv=0x00007ffeefbff980) at main.cpp:87
frame #10: 0x00007fff74faa115 libdyld.dylib`start + 1
34 namespace boost
35 {
36 template <typename Target, typename Source>
37 inline Target lexical_cast(const Source &arg)
38 {
(lldb) l
39 Target result = Target();
40
41 if (!boost::conversion::detail::try_lexical_convert(arg, result)) {
42 boost::conversion::detail::throw_bad_cast<Source, Target>();
43 }
44
45 return result;
46 }
47
48 template <typename Target>
(lldb) p arg
(const std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) $1 = "/Users/antonperkov/Library/Application Support/eosio.rel/nodeos/config/config.ini"
(lldb) p result
(boost::filesystem::path) $0 = (m_pathname = "/Users/antonperkov/Library/Application")
ATC: Run nodeos with --config /path/with/white\ space.
Expected Result: `Config file "/path/with/white space" missing.