Comparing version 0.1.2 to 0.1.3
@@ -13,9 +13,3 @@ var http = require('http'); | ||
function main() { | ||
/*var commander = require("commander"); | ||
commander.version("0.0.1").usage("[options]").option("-f, --fromDir <dir path>", "Source directory to sync").option("-t, --toDir <dir path>", "Destination directory to sync").option("-n, --nextManifest <manifest file path>", "Next manifest file path").option("-p, --previousManifest [manifest file path]", "Previous manifest file path").option("-i, --ignore [patterns]", "List of files/directories to ignore and not sync, delimited by ;").option("-q, --quiet", "No logging").option("-w, --whatIf", "Only log without actual copy/remove of files").parse(process.argv); | ||
var commanderValues = commander; | ||
var fromDir = commanderValues.fromDir;*/ | ||
// https://amitap:iis6!dfu@at.scm.kudu3.antares-test.windows-int.net/at.git | ||
if (process.argv.length != 3) { | ||
@@ -114,14 +108,22 @@ console.error('Usage: kuduExec [kudu service url (with username)]') | ||
var result = ''; | ||
res.setEncoding('utf8'); | ||
res.on('data', function (chunk) { | ||
chunk = chunk || ''; | ||
result += chunk; | ||
}); | ||
res.on('end', function () { | ||
if (res.statusCode != 200) { | ||
console.error(('Status code - ' + res.statusCode + '\n').red + result); | ||
process.exit(1); | ||
} | ||
try { | ||
chunk = chunk || ''; | ||
result += chunk; | ||
var trimmedResult = result.trim(); | ||
if (trimmedResult.lastIndexOf('}') === (trimmedResult.length - 1)) { | ||
processCommandResult(JSON.parse(trimmedResult)); | ||
} | ||
processCommandResult(JSON.parse(trimmedResult)); | ||
} | ||
catch (e) { | ||
console.error(chunk.red); | ||
console.error(result.red); | ||
process.exit(1); | ||
@@ -132,2 +134,7 @@ } | ||
post_req.on('error', function (error) { | ||
console.error(chunk.red); | ||
process.exit(1); | ||
}); | ||
// post the data | ||
@@ -134,0 +141,0 @@ post_req.write(postData); |
{ | ||
"name": "kuduexec", | ||
"author": "Outercurve Foundation", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Tool providing a way to execute commands on your Azure Website", | ||
@@ -6,0 +6,0 @@ "tags": [ |
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
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
140
16153