mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
22 lines
600 B
JavaScript
22 lines
600 B
JavaScript
'use strict';
|
|
|
|
const BbPromise = require('bluebird');
|
|
|
|
module.exports = {
|
|
validate() {
|
|
if (!this.serverless.config.servicePath) {
|
|
throw new this.serverless.classes
|
|
.Error('This command can only be run inside a service directory');
|
|
}
|
|
|
|
this.options.stage = this.options.stage
|
|
|| (this.serverless.service.provider && this.serverless.service.provider.stage)
|
|
|| 'dev';
|
|
this.options.region = this.options.region
|
|
|| (this.serverless.service.provider && this.serverless.service.provider.region)
|
|
|| 'us-east-1';
|
|
|
|
return BbPromise.resolve();
|
|
},
|
|
};
|