Skip to content

Commit f2c6b6b

Browse files
author
ljacobsson
committed
fix region option
1 parent 6a29ef5 commit f2c6b6b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mhlabs/evb-cli",
3-
"version": "1.1.44",
3+
"version": "1.1.45",
44
"description": "A package for building EventBridge/CloudWatch Events patterns",
55
"main": "index.js",
66
"scripts": {

src/commands/code-binding/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ program
88
.option("-t, --template [template]", "Path to template file")
99
.option("-n, --type-name [typeName]", "Type name", "MyType")
1010
.option("-p, --profile [profile]", "AWS profile to use")
11+
.option(
12+
"--region [region]",
13+
"The AWS region to use. Falls back on AWS_REGION environment variable if not specified"
14+
)
1115
.option(
1216
"-o, --output-file [outputFile]",
1317
"Output file name. Writes to std out if skipped"

src/commands/shared/auth-helper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ function initAuth(cmd) {
88
AWS.config.credentials = credentials;
99
} else {
1010
process.env.AWS_PROFILE = cmd.profile || process.env.AWS_PROFILE || "default";
11-
process.env.AWS_REGION = cmd.region || process.env.AWS_REGION || AWS.config.region
1211
AWS.config.credentialProvider.providers.unshift(
1312
new AWS.SingleSignOnCredentials()
1413
);
1514
}
15+
process.env.AWS_REGION = cmd.region || process.env.AWS_REGION || AWS.config.region
1616
}
1717

1818
module.exports = {

0 commit comments

Comments
 (0)