dropshell release 2025.0601.1821
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name
2025-06-01 18:21:32 +12:00
parent ab73a47751
commit a5cf9313e9
13 changed files with 59 additions and 8 deletions

View File

@@ -312,7 +312,7 @@ std::string requote(std::string str) {
}
int die(const std::string & msg) {
int return_die(const std::string & msg) {
error << "Fatal error:" << std::endl;
error << msg << std::endl;
return 1;
@@ -650,4 +650,11 @@ bool file_replace_or_add_segment(std::string filepath, std::string segment)
return true;
}
bool legal_service_name(const std::string &service_name)
{
// legal characters are alphanumeric, and - and _
std::regex legal_chars("^[a-zA-Z0-9_-]+$");
return std::regex_match(service_name, legal_chars);
}
} // namespace dropshell