File tree Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Expand file tree Collapse file tree 2 files changed +9
-19
lines changed Original file line number Diff line number Diff line change @@ -42,18 +42,14 @@ var helpers = {
4242 *
4343 * @param {String } path
4444 */
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+ } ,
5753
5854 /**
5955 * @param {String } path
Original file line number Diff line number Diff line change @@ -62,13 +62,7 @@ module.exports = {
6262 fsHelpers . makeDir ( hooksPath ) ;
6363 HOOKS . forEach ( function ( hookName ) {
6464 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' } ) ;
7266 } ) ;
7367 } ,
7468
You can’t perform that action at this time.
0 commit comments