mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
fix: #1973 deploy fails with unhelpful error message when service name is not a valid CF stack name
This commit is contained in:
parent
dbeaa54832
commit
b8e5bb4eca
@ -32,7 +32,7 @@ module.exports = {
|
||||
createStack() {
|
||||
const stackName = `${this.serverless.service.service}-${this.options.stage}`;
|
||||
|
||||
if (/^[a-zA-Z1-9-]+/.test(stackName) || stackName.length > 128){
|
||||
if (/^[^a-zA-Z].+|.*[^a-zA-Z0-9\-].*/.test(stackName) || stackName.length > 128){
|
||||
const errorMessage = [
|
||||
'The stack name "' + stackName + '" is not quallify. ',
|
||||
'A stack name can contain only alphanumeric',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user