@@ -88,8 +88,17 @@ const names = (() => {
8888 return false
8989 }
9090 } ) ( )
91- if ( musl ) return arch === "x64" ? ( baseline ? [ `${ base } -baseline-musl` , `${ base } -musl` , `${ base } -baseline` , base ] : [ `${ base } -musl` , `${ base } -baseline-musl` , base , `${ base } -baseline` ] ) : [ `${ base } -musl` , base ]
92- return arch === "x64" ? ( baseline ? [ `${ base } -baseline` , base , `${ base } -baseline-musl` , `${ base } -musl` ] : [ base , `${ base } -baseline` , `${ base } -musl` , `${ base } -baseline-musl` ] ) : [ base , `${ base } -musl` ]
91+ if ( musl )
92+ return arch === "x64"
93+ ? baseline
94+ ? [ `${ base } -baseline-musl` , `${ base } -musl` , `${ base } -baseline` , base ]
95+ : [ `${ base } -musl` , `${ base } -baseline-musl` , base , `${ base } -baseline` ]
96+ : [ `${ base } -musl` , base ]
97+ return arch === "x64"
98+ ? baseline
99+ ? [ `${ base } -baseline` , base , `${ base } -baseline-musl` , `${ base } -musl` ]
100+ : [ base , `${ base } -baseline` , `${ base } -musl` , `${ base } -baseline-musl` ]
101+ : [ base , `${ base } -musl` ]
93102 }
94103 return arch === "x64" ? ( baseline ? [ `${ base } -baseline` , base ] : [ base , `${ base } -baseline` ] ) : [ base ]
95104} ) ( )
@@ -98,10 +107,11 @@ function findBinary(startDir) {
98107 let current = startDir
99108 for ( ; ; ) {
100109 const modules = path . join ( current , "node_modules" )
101- if ( fs . existsSync ( modules ) ) for ( const name of names ) {
102- const candidate = path . join ( modules , name , "bin" , binary )
103- if ( fs . existsSync ( candidate ) ) return candidate
104- }
110+ if ( fs . existsSync ( modules ) )
111+ for ( const name of names ) {
112+ const candidate = path . join ( modules , name , "bin" , binary )
113+ if ( fs . existsSync ( candidate ) ) return candidate
114+ }
105115 const parent = path . dirname ( current )
106116 if ( parent === current ) return
107117 current = parent
@@ -110,7 +120,11 @@ function findBinary(startDir) {
110120
111121const resolved = envPath || ( fs . existsSync ( cached ) ? cached : findBinary ( scriptDir ) )
112122if ( ! resolved ) {
113- console . error ( "It seems that your package manager failed to install the right lildax CLI package. Try manually installing " + names . map ( ( name ) => `"${ name } "` ) . join ( " or " ) + " package" )
123+ console . error (
124+ "It seems that your package manager failed to install the right lildax CLI package. Try manually installing " +
125+ names . map ( ( name ) => `"${ name } "` ) . join ( " or " ) +
126+ " package" ,
127+ )
114128 process . exit ( 1 )
115129}
116130run ( resolved )
0 commit comments