in include/poac/subcmd/login.hpp [19:40]
int _main(VS&& argv) {
namespace fs = boost::filesystem;
namespace exception = core::exception;
if (fs::create_directories(io::file::path::poac_state_dir)) {
throw exception::invalid_second_arg("login");
}
const std::string token_path = io::file::path::poac_token_dir.string();
if (std::ofstream ofs(token_path); ofs) {
ofs << argv[0] << std::endl;
std::cout << io::cli::bold
<< "Write to " + token_path
<< io::cli::reset
<< std::endl;
}
else { // file open error
throw exception::invalid_second_arg("login");
}
return EXIT_SUCCESS;
}