dropshell release 2025.0601.1821
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
@@ -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
|
Reference in New Issue
Block a user