File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -113,15 +113,15 @@ h.getHomeDir = function() {
113
113
} ;
114
114
115
115
h . getCacheDir = function ( ) {
116
- return this . getHomeDir ( ) + '/ .lc/' ;
116
+ return path . join ( this . getHomeDir ( ) , ' .lc' ) ;
117
117
} ;
118
118
119
119
h . getCacheFile = function ( k ) {
120
- return this . getCacheDir ( ) + k + '.json' ;
120
+ return path . join ( this . getCacheDir ( ) , k + '.json' ) ;
121
121
} ;
122
122
123
123
h . getConfigFile = function ( ) {
124
- return this . getHomeDir ( ) + '/ .lcconfig';
124
+ return path . join ( this . getHomeDir ( ) , ' .lcconfig') ;
125
125
} ;
126
126
127
127
h . readStdin = function ( cb ) {
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ describe('helper', function() {
129
129
process . env . HOME = '/home/skygragon' ;
130
130
131
131
assert . equal ( h . getHomeDir ( ) , '/home/skygragon' ) ;
132
- assert . equal ( h . getCacheDir ( ) , '/home/skygragon/.lc/ ' ) ;
132
+ assert . equal ( h . getCacheDir ( ) , '/home/skygragon/.lc' ) ;
133
133
assert . equal ( h . getCacheFile ( 'xxx' ) , '/home/skygragon/.lc/xxx.json' ) ;
134
134
assert . equal ( h . getConfigFile ( ) , '/home/skygragon/.lcconfig' ) ;
135
135
assert . equal ( h . getFilename ( '/home/skygragon/.lc/xxx.json' ) , 'xxx' ) ;
You can’t perform that action at this time.
0 commit comments