mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
'use strict';
|
|
|
|
const BbPromise = require('bluebird');
|
|
|
|
module.exports = {
|
|
validate() {
|
|
return new BbPromise((resolve, reject) => {
|
|
if (!this.serverless.config.servicePath) {
|
|
const error = new this.serverless.classes
|
|
.Error('This command can only be run inside a service directory');
|
|
reject(error);
|
|
}
|
|
|
|
this.options.stage = this.provider.getStage();
|
|
this.options.region = this.provider.getRegion();
|
|
|
|
return resolve();
|
|
});
|
|
},
|
|
};
|