File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ const BbPromise = require('bluebird');
5
5
6
6
module . exports = {
7
7
setDefaults ( ) {
8
- this . options . stage = _ . get ( this , 'options.stage' ) || 'dev' ;
8
+ this . options . stage = _ . get ( this , 'options.stage' ) || _ . get ( this , 'serverless.service.provider.stage' ) || 'dev' ;
9
9
this . options . runtime = _ . get ( this , 'options.runtime' ) || 'nodejs8' ;
10
10
11
11
// serverless framework is hard-coding us-east-1 region from aws
Original file line number Diff line number Diff line change @@ -43,10 +43,12 @@ describe('Utils', () => {
43
43
it ( 'should set the provider values for stage and region if provided' , ( ) => {
44
44
googleCommand . serverless . service . provider = {
45
45
region : 'my-region' ,
46
+ stage : 'my-stage' ,
46
47
} ;
47
48
48
49
return googleCommand . setDefaults ( ) . then ( ( ) => {
49
50
expect ( googleCommand . options . region ) . toEqual ( 'my-region' ) ;
51
+ expect ( googleCommand . options . stage ) . toEqual ( 'my-stage' ) ;
50
52
} ) ;
51
53
} ) ;
52
54
You can’t perform that action at this time.
0 commit comments