File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,13 @@ var path = require('path'),
4
4
config = require ( '../config/config' ) ;
5
5
exec = require ( 'child_process' ) . exec ;
6
6
7
+ fs . exists || ( fs . exists = path . exists ) ;
8
+
7
9
/*
8
10
* Checks to see if a bitbucket ssh key exists already.
9
11
*/
10
12
exports . has_ssh_key = function has_ssh_key ( cb ) {
11
- path . exists ( process . env [ 'HOME' ] + '/.ssh/id_rsa_bitbucket.pub' , function ( exists ) {
13
+ fs . exists ( process . env [ 'HOME' ] + '/.ssh/id_rsa_bitbucket.pub' , function ( exists ) {
12
14
if ( exists ) {
13
15
cb ( true ) ;
14
16
} else {
@@ -43,8 +45,8 @@ exports.generate_ssh_key = function(cb) {
43
45
exports . append_to_ssh_config = function append_to_ssh_config ( cb ) {
44
46
var ssh_config_file = process . env [ 'HOME' ] + '/.ssh/config' ;
45
47
var identity_info = "Host bitbucket.org \r\n\tHostName bitbucket.org\r\n\tStrictHostKeyChecking no\r\n\tPreferredAuthentications publickey\r\n\tIdentityFile ~/.ssh/id_rsa_bitbucket" ;
46
-
47
- path . exists ( ssh_config_file , function ( exists ) {
48
+
49
+ fs . exists ( ssh_config_file , function ( exists ) {
48
50
if ( exists ) {
49
51
//file exists, let's check if it has the bitbucket host in it, otherwise add it
50
52
fs . readFile ( ssh_config_file , 'ascii' , function ( err , data ) {
@@ -170,4 +172,4 @@ exports.create_project_gitignore = function(cb) {
170
172
} ) ;
171
173
172
174
} ) ;
173
- } ;
175
+ } ;
You can’t perform that action at this time.
0 commit comments