Ensure userDir is an absolute path when used with sshkeygen

This commit is contained in:
Nick O'Leary 2018-02-26 23:45:21 +00:00
parent af947879d8
commit ce5242cfe8
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ function init(_settings, _runtime) {
settings = _settings;
runtime = _runtime;
log = runtime.log;
sshkeyDir = fspath.join(settings.userDir, "projects", ".sshkeys");
sshkeyDir = fspath.resolve(fspath.join(settings.userDir, "projects", ".sshkeys"));
userSSHKeyDir = fspath.join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH, ".ssh");
// console.log('sshkeys.init()');
return fs.ensureDir(sshkeyDir);