File tree 2 files changed +9
-19
lines changed
2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,14 @@ var helpers = {
42
42
*
43
43
* @param {String } path
44
44
*/
45
- exists : typeof fs . access === 'function' ?
46
- function ( path ) {
47
- try {
48
- fs . accessSync ( path ) ;
49
- return true ;
50
- } catch ( err ) {
51
- return false ;
52
- }
53
- } :
54
- function ( path ) {
55
- return fs . existsSync ( path ) ;
56
- } ,
45
+ exists : function ( path ) {
46
+ try {
47
+ fs . accessSync ( path ) ;
48
+ return true ;
49
+ } catch ( err ) {
50
+ return false ;
51
+ }
52
+ } ,
57
53
58
54
/**
59
55
* @param {String } path
Original file line number Diff line number Diff line change @@ -62,13 +62,7 @@ module.exports = {
62
62
fsHelpers . makeDir ( hooksPath ) ;
63
63
HOOKS . forEach ( function ( hookName ) {
64
64
var hookPath = path . resolve ( hooksPath , hookName ) ;
65
- try {
66
- fs . writeFileSync ( hookPath , hook , { mode : '0777' } ) ;
67
- } catch ( e ) {
68
- // node 0.8 fallback
69
- fs . writeFileSync ( hookPath , hook , 'utf8' ) ;
70
- fs . chmodSync ( hookPath , '0777' ) ;
71
- }
65
+ fs . writeFileSync ( hookPath , hook , { mode : '0777' } ) ;
72
66
} ) ;
73
67
} ,
74
68
You can’t perform that action at this time.
0 commit comments