introducde more flexible pathing

This commit is contained in:
2016-06-28 02:10:51 +02:00
parent 5091625953
commit 8f29f234f1
9 changed files with 51 additions and 41 deletions

View File

@@ -4,9 +4,9 @@ import * as helpers from "./smartssh.classes.helpers";
import {SshKey} from "./smartssh.classes.sshkey"
export class SshConfig {
sshKeyArray:SshKey[];
private _sshKeyArray:SshKey[];
constructor(sshKeyArrayArg:SshKey[]){
this.sshKeyArray = sshKeyArrayArg;
this._sshKeyArray = sshKeyArrayArg;
}
/**
@@ -16,8 +16,8 @@ export class SshConfig {
let done = plugins.q.defer();
let configArray:configObject[] = [];
let configString;
for(let key in this.sshKeyArray){
let sshKey = this.sshKeyArray[key];
for(let key in this._sshKeyArray){
let sshKey = this._sshKeyArray[key];
if(sshKey.host){
configString = "Host " + sshKey.host + "\n" +
" HostName " + sshKey.host + "\n" +
@@ -40,7 +40,8 @@ export class SshConfig {
read(dirPathArg){
let done = plugins.q.defer();
let configArray:configObject[];
plugins.smartfile.fs.toStringSync(plugins.path.join(dirPathArg,"config"));
return done.promise;
}
};