Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added callback to credentials

  • Loading branch information...
commit 4952064894309f076f951ccf6b206a1c6f12168f 1 parent 113cb2b
@franklovecchio franklovecchio authored
Showing with 4 additions and 3 deletions.
  1. +3 −1 modules/credentials.js
  2. +1 −2  run/client.js
View
4 modules/credentials.js
@@ -10,7 +10,7 @@ CredentialManagerModule = function (constants, utilities, logger) {
Module.logger = logger;
};
-CredentialManagerModule.prototype.check = function () {
+CredentialManagerModule.prototype.check = function (callback) {
var checkCredentialsArray = [Module.constants.strings.AWS_ACCESS_KEY_ID, Module.constants.strings.AWS_SECRET_ACCESS_KEY];
checkCredentialsArray.forEach(function (credential) {
var check = Module.constants.globals[credential];
@@ -22,6 +22,8 @@ CredentialManagerModule.prototype.check = function () {
/* For node-cloudwatch */
process.env[Module.constants.strings.AWS_SECRET_ACCESS_KEY] = Module.constants.globals[Module.constants.strings.AWS_SECRET_ACCESS_KEY];
process.env[Module.constants.strings.AWS_ACCESS_KEY_ID] = Module.constants.globals[Module.constants.strings.AWS_ACCESS_KEY_ID];
+
+ callback();
};
exports.CredentialManagerModule = CredentialManagerModule;
View
3  run/client.js
@@ -51,8 +51,7 @@ function NodeMonitor() {
constants.globals = {};
/* Parse configuration */
- utilities.parseConfig(
- constants.strings.MONITOR_CONFIG_FILE, function () {
+ utilities.parseConfig(constants.strings.MONITOR_CONFIG_FILE, function () {
/* Parse command line options */
utilities.parseCommandLineOptions(function () {
/* Validate credentials */
Please sign in to comment.
Something went wrong with that request. Please try again.