Switch the regex ordering for hyphen and underscore for service name to remove warning

This commit is contained in:
Nick Hammond
2024-03-06 09:08:17 -07:00
parent cc8c508556
commit a1bc6d61af

View File

@@ -288,7 +288,7 @@ class Kamal::Configuration
end
def ensure_valid_service_name
raise ArgumentError, "Service name can only include alphanumeric characters, hyphens, and underscores" unless raw_config[:service] =~ /^[a-z0-9-_]+$/
raise ArgumentError, "Service name can only include alphanumeric characters, hyphens, and underscores" unless raw_config[:service] =~ /^[a-z0-9_-]+$/
true
end