Comparing version 0.2.5 to 0.2.6
@@ -0,3 +1,4 @@ | ||
// Generated by CoffeeScript 1.9.3 | ||
(function() { | ||
var Driver, FS, Promise, SSH; | ||
var Driver, FS, Path, Promise, SSH; | ||
@@ -8,2 +9,4 @@ FS = require('fs'); | ||
Path = require('path'); | ||
Promise = require('a-promise'); | ||
@@ -21,6 +24,8 @@ | ||
if (Config.privateKey) { | ||
try { | ||
Config.privateKey = FS.readFileSync(Config.privateKey); | ||
} catch (_error) { | ||
throw new Error("Unable to read the Private Key File"); | ||
if (Path.isAbsolute(Config.privateKey)) { | ||
try { | ||
Config.privateKey = FS.readFileSync(Config.privateKey); | ||
} catch (_error) { | ||
throw new Error("Unable to read the Private Key File"); | ||
} | ||
} | ||
@@ -27,0 +32,0 @@ } else if (typeof Config.password === 'undefined') { |
{ | ||
"name": "node-ssh", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "SS2 with Promises", | ||
@@ -26,6 +26,3 @@ "main": "Dist/SSH.js", | ||
"a-promise": "latest" | ||
}, | ||
"scripts":{ | ||
"prepublish": "mkdir -p Dist; uc-compile Source/SSH.coffee > Dist/SSH.js" | ||
} | ||
} |
@@ -22,3 +22,3 @@ Node-SSH - SSH2 with Promises | ||
ssh.put('/home/steel/Lab/LocalSource', '/home/steel/Lab/RemoteTarget').then(function() { | ||
console.log("The Directory thing is done"); | ||
console.log("The File thing is done"); | ||
}, function(error) { | ||
@@ -30,3 +30,3 @@ console.log("Something's wrong"); | ||
ssh.putMulti([{'Local': '/home/steel/Lab/LocalSource', 'Remote': '/home/steel/Lab/RemoteTarget'}]).then(function() { | ||
console.log("The Directory thing is done"); | ||
console.log("The File thing is done"); | ||
}, function(error) { | ||
@@ -33,0 +33,0 @@ console.log("Something's wrong"); |
Sorry, the diff of this file is not supported yet
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
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
13430
205
3