Comparing version 1.2.0 to 1.3.0
24
index.js
@@ -169,13 +169,17 @@ #!/usr/bin/env node | ||
var AWS = require('aws-sdk'); | ||
try { | ||
var iniFile = fs.readFileSync(path.join(process.env.HOME || process.env.HOMEPATH, '.aws', 'config'), 'utf8'); | ||
var iniData = ini.decode(iniFile); | ||
var section = iniData[process.env.AWS_PROFILE ? 'profile ' + process.env.AWS_PROFILE : 'default']; | ||
if (section.region) { | ||
// Use region from config | ||
AWS.config.update({region: section.region}); | ||
if (process.env.AWS_REGION) { | ||
AWS.config.update({ region: process.env.AWS_REGION }); | ||
} else { | ||
try { | ||
var iniFile = fs.readFileSync(path.join(process.env.HOME || process.env.HOMEPATH, '.aws', 'config'), 'utf8'); | ||
var iniData = ini.decode(iniFile); | ||
var section = iniData[process.env.AWS_PROFILE ? 'profile ' + process.env.AWS_PROFILE : 'default']; | ||
if (section.region) { | ||
// Use region from config | ||
AWS.config.update({region: section.region}); | ||
} | ||
} catch (err) { | ||
// Ini file not found, ignore | ||
console.error(err); | ||
} | ||
} catch (err) { | ||
// Ini file not found, ignore | ||
console.error(err); | ||
} | ||
@@ -182,0 +186,0 @@ if (process.env.https_proxy) { |
{ | ||
"name": "cwtail", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "CloudWatch Logs Tail", | ||
@@ -23,3 +23,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"aws-sdk": "^2.2.21", | ||
"aws-sdk": "^2.7.20", | ||
"bluebird": "^3.0.6", | ||
@@ -26,0 +26,0 @@ "ini": "^1.3.4", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10261
227
10
Updatedaws-sdk@^2.7.20