Skip to content

Commit

Permalink
Remove trailing line
Browse files Browse the repository at this point in the history
  • Loading branch information
pandres95 committed May 25, 2016
1 parent 9fe2abb commit 1ff8fa2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ssh-keygen.js
Expand Up @@ -80,7 +80,13 @@ function ssh_keygen(location, opts, callback){
log('destroying pub key '+pubLocation);
fs.unlink(pubLocation, function(err){
if(err) return callback(err);
return callback(undefined, { key: key, pubKey: pubKey });
key = key.toString();
key = key.substring(0, key.lastIndexOf(" \n"));
pubKey = pubKey.toString();
pubKey = pubKey.substring(0, pubKey.lastIndexOf(" \n"));
return callback(undefined, {
key: key, pubKey: pubKey
});
});
} else callback(undefined, { key: key, pubKey: pubKey });
});
Expand Down

0 comments on commit 1ff8fa2

Please sign in to comment.