@@ -6,7 +6,7 @@ const makeGroups = (key, items) => {
66 const sortedDescending = [ ...items ] . sort ( ( x , y ) => y [ key ] - x [ key ] )
77
88 const { groups } = sortedDescending . reduce (
9- ( { i, groups} , item ) => {
9+ ( { i, groups } , item ) => {
1010 const next = item [ key ]
1111 const isNewGroup = next < i
1212 return {
@@ -15,7 +15,7 @@ const makeGroups = (key, items) => {
1515 ? [ [ item ] , ...groups ]
1616 : [ [ ...groups [ 0 ] , item ] , ...groups . slice ( 1 ) ]
1717 }
18- } , { i : Infinity , groups : [ ] }
18+ } , { i : Infinity , groups : [ ] }
1919 )
2020
2121 return groups
@@ -32,7 +32,7 @@ const checkAccess = io => async ({
3232 source
3333} ) => {
3434 try {
35- await io . checkAccess ( { target : source } )
35+ await io . checkAccess ( { target : source } )
3636 } catch ( err ) {
3737 console . error ( `* Read failed: ${ source } ` )
3838 throw err
@@ -48,10 +48,10 @@ const installDirectory = io => async ({
4848 dmode
4949} ) => {
5050 try {
51- await io . overwriteDirectory ( { source, destination} )
52- await io . chmodRecursive ( { fmode, dmode, target : destination } )
53- await io . chownRecursive ( { owner, target : destination } )
54- await io . chgrpRecursive ( { group, target : destination } )
51+ await io . overwriteDirectory ( { source, destination } )
52+ await io . chmodRecursive ( { fmode, dmode, target : destination } )
53+ await io . chownRecursive ( { owner, target : destination } )
54+ await io . chgrpRecursive ( { group, target : destination } )
5555 console . info ( `${ source } => ${ destination } ` )
5656 } catch ( err ) {
5757 console . error ( `* Install failed: ${ source } => ${ destination } ` )
@@ -63,7 +63,7 @@ const unlink = io => async ({
6363 source
6464} ) => {
6565 try {
66- await io . unlink ( { target : source } )
66+ await io . unlink ( { target : source } )
6767 console . info ( `${ source } <= /dev/null` )
6868 } catch ( err ) {
6969 console . error ( `* Unlink failed: ${ source } <= /dev/null #` )
@@ -79,10 +79,10 @@ const installFile = io => async ({
7979 fmode
8080} ) => {
8181 try {
82- await io . copyFile ( { source, destination} )
83- await io . chmod ( { mode : fmode , target : destination } )
84- await io . chown ( { owner, target : destination } )
85- await io . chgrp ( { group, target : destination } )
82+ await io . copyFile ( { source, destination } )
83+ await io . chmod ( { mode : fmode , target : destination } )
84+ await io . chown ( { owner, target : destination } )
85+ await io . chgrp ( { group, target : destination } )
8686 console . info ( `${ source } +> ${ destination } ` )
8787 } catch ( err ) {
8888 console . error ( `* Install failed: ${ source } +> ${ destination } ` )
@@ -95,15 +95,15 @@ const installSymlink = io => async ({
9595 destination
9696} ) => {
9797 try {
98- await io . makeSymlink ( { source, destination} )
98+ await io . makeSymlink ( { source, destination } )
9999 console . info ( `${ source } -> ${ destination } ` )
100100 } catch ( err ) {
101101 console . error ( `* Link failed: ${ source } -> ${ destination } ` )
102102 throw err
103103 }
104104}
105105
106- module . exports = async ( { unlinks, directories, files, symlinks, io} ) => {
106+ module . exports = async ( { unlinks, directories, files, symlinks, io } ) => {
107107 await Promise . all ( [ ...directories , ...files ] . map ( checkAccess ( io ) ) )
108108 console . log ( '>> Unlinking paths' )
109109 if ( isEmpty ( unlinks ) ) console . log ( 'Nothing to do' )
0 commit comments