Skip to content

Commit 9512ecf

Browse files
stalleyjmattcolegate
authored andcommitted
Fix node-hc by readding arg shift
1 parent 03beb0f commit 9512ecf

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

bin/appmetrics-cli.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
var node_args = process.execArgv;
2020

2121
// First argv[0] should be 'node' and argv[1] the name of this file.
22+
// We want to IGNORE these 2 args
2223
var args = process.argv.splice(0);
24+
args.shift();
25+
args.shift();
2326

2427
var arg = args.shift();
2528
while (typeof arg != 'undefined') {

extract_all_binaries.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ var ensureSupportedPlatformOrExit = function() {
9494
};
9595

9696
var getSupportedNodeVersionOrExit = function() {
97-
var supportedMajorVersions = "v4, v5, v6, v7, v8"
97+
var supportedMajorVersions = 'v4, v5, v6, v7, v8';
9898
// version strings are of the format 'vN.N.N' where N is a positive integer.
9999
// we want the first N.
100-
var majorVersion = process.version.substring(1, process.version.indexOf('.'));
100+
var majorVersion = process.version.substring(1, process.version.indexOf('.'));
101101
if (supportedMajorVersions.indexOf('v' + majorVersion) === -1) {
102102
console.log('Unsupported version ' + process.version + '. Trying rebuild.');
103103
fail();
@@ -136,7 +136,7 @@ function fail() {
136136
}
137137

138138
function zipAndExtract(targetDir, relativeFilepath, destDir) {
139-
fs
139+
fs
140140
.createReadStream(targetDir + relativeFilepath)
141141
.pipe(zlib.createGunzip())
142142
.on('error', function(err) {

probes/http-outbound-probe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ function getRequestItems(options) {
4141
var returnObject = { requestMethod: 'GET', urlRequested: '', headers: '' };
4242
if (options !== null) {
4343
var parsedOptions;
44-
switch(typeof options) {
44+
switch (typeof options) {
4545
case 'object':
4646
returnObject.urlRequested = formatURL(options);
4747
parsedOptions = options;
4848
break;
49-
case 'string':
49+
case 'string':
5050
returnObject.urlRequested = options;
5151
parsedOptions = url.parse(options);
5252
break;

probes/https-outbound-probe.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ function getRequestItems(options) {
3737
var returnObject = { requestMethod: 'GET', urlRequested: '', headers: '' };
3838
if (options !== null) {
3939
var parsedOptions;
40-
switch(typeof options) {
40+
switch (typeof options) {
4141
case 'object':
4242
returnObject.urlRequested = formatURL(options);
4343
parsedOptions = options;
4444
break;
45-
case 'string':
45+
case 'string':
4646
returnObject.urlRequested = options;
4747
parsedOptions = url.parse(options);
4848
break;

0 commit comments

Comments
 (0)