remove redundant service list

This commit is contained in:
eL0ck 2016-09-26 10:07:42 +10:00 committed by Florian Motlik
parent a1563a3a73
commit 228d52cc7c

View File

@ -69,10 +69,11 @@ class Service {
};
}
if (['aws', 'azure', 'google', 'ibm'].indexOf(serverlessFile.provider.name) === -1) {
const providers = ['aws', 'azure', 'google', 'ibm'];
if (providers.indexOf(serverlessFile.provider.name) === -1) {
const errorMessage = [
`Provider "${serverlessFile.provider.name}" is not supported.`,
' Valid values for provider are: aws, azure, google, ibm.',
` Valid values for provider are: ${providers.join(', ')}.`,
' Please provide one of those values to the "provider" property in serverless.yml.',
].join('');
throw new SError(errorMessage);