Comparing version 2.0.1 to 2.0.2
@@ -39,2 +39,16 @@ 'use strict'; | ||
return new Promise(function (resolve, reject) { | ||
if (typeof config.username !== 'string') { | ||
throw new Error('No username provided'); | ||
} else if (typeof config.host !== 'string') { | ||
throw new Error('No host provided'); | ||
} | ||
if (config.privateKey) { | ||
if (Path.isAbsolute(config.privateKey)) { | ||
try { | ||
config.privateKey = FS.readFileSync(config.privateKey); | ||
} catch (err) { | ||
throw new Error('Unable to read private key'); | ||
} | ||
} | ||
} | ||
_this.connection.on('error', reject); | ||
@@ -41,0 +55,0 @@ _this.connection.on('ready', function () { |
{ | ||
"name": "node-ssh", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "SS2 with Promises", | ||
@@ -5,0 +5,0 @@ "main": "Dist/SSH.js", |
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
19100
468