File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 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');
55
66module . exports = {
77 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' ;
99 this . options . runtime = _ . get ( this , 'options.runtime' ) || 'nodejs8' ;
1010
1111 // 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', () => {
4343 it ( 'should set the provider values for stage and region if provided' , ( ) => {
4444 googleCommand . serverless . service . provider = {
4545 region : 'my-region' ,
46+ stage : 'my-stage' ,
4647 } ;
4748
4849 return googleCommand . setDefaults ( ) . then ( ( ) => {
4950 expect ( googleCommand . options . region ) . toEqual ( 'my-region' ) ;
51+ expect ( googleCommand . options . stage ) . toEqual ( 'my-stage' ) ;
5052 } ) ;
5153 } ) ;
5254
You can’t perform that action at this time.
0 commit comments