mirror of
https://github.com/serverless/serverless.git
synced 2025-12-08 19:46:03 +00:00
22 lines
503 B
JavaScript
22 lines
503 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();
|
|
});
|
|
},
|
|
};
|