in include/poac/subcmd/init.hpp [33:57]
std::string check_requirements() {
namespace exception = core::exception;
if (const auto result = io::file::yaml::exists_config()) {
std::cerr << io::cli::bold << io::cli::red
<< "Already " << *result << " exists." << std::endl
<< std::endl
<< "See `poac init --help`" << std::endl
<< std::endl
<< "Use `poac install <pkg>` afterwards to install a package and" << std::endl
<< "save it as a dependency in the poac.yml file." << std::endl
<< std::endl
<< "Do you want overwrite? (Y/n): "
<< io::cli::reset;
std::string ans;
std::cin >> ans;
std::transform(ans.cbegin(), ans.cend(), ans.begin(), tolower);
if (ans == "y" || ans == "yes")
return *result;
else
throw exception::error("canceled");
}
// default setting file name
return "poac.yml";
}