Skip to content

Commit 1095ead

Browse files
authored
Merge pull request #52 from HyperBrain/fix-provider-alias-variable-substitution
Set provider.alias variable to unresolved values in init.
2 parents 6238e9e + f5513e3 commit 1095ead

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ class AwsAlias {
2626
this._options = options || {};
2727
this._provider = this._serverless.getProvider('aws');
2828

29+
/**
30+
* Set preliminary stage and alias. This is needed to enable the injection
31+
* of the stage into the system variables. The values are overwritten by
32+
* validate with their actually evaluated and substituted values.
33+
*/
34+
this._stage = this._provider.getStage();
35+
this._alias = this._options.alias || this._stage;
36+
this._serverless.service.provider.alias = this._alias;
37+
2938
/**
3039
* Load stack helpers from Serverless installation.
3140
*/

0 commit comments

Comments
 (0)