@@ -221,30 +221,29 @@ async function installFromSource(fpmVersion, fpmRepo){
221221
222222 // If we found unversioned gfortran, check if it's gcc >= 14
223223 // If so, or if we didn't find unversioned gfortran, look for a versioned one <= 13
224- if ( ! foundGfortran || true ) { // Always prefer versioned <= 13 for compatibility
225- let foundVersioned = false ;
226- for ( const ver of [ 13 , 12 , 11 , 10 ] ) {
227- try {
228- await exec . exec ( 'which' , [ `gfortran-${ ver } ` ] , { silent : true } ) ;
229- gfortranCmd = `gfortran-${ ver } ` ;
230- foundVersioned = true ;
231- console . log ( `Found ${ gfortranCmd } ` ) ;
232- break ;
233- } catch ( e ) {
234- // Continue searching
235- }
224+ // Always prefer versioned <= 13 for compatibility
225+ let foundVersioned = false ;
226+ for ( const ver of [ 13 , 12 , 11 , 10 ] ) {
227+ try {
228+ await exec . exec ( 'which' , [ `gfortran-${ ver } ` ] , { silent : true } ) ;
229+ gfortranCmd = `gfortran-${ ver } ` ;
230+ foundVersioned = true ;
231+ console . log ( `Found ${ gfortranCmd } ` ) ;
232+ break ;
233+ } catch ( e ) {
234+ // Continue searching
236235 }
236+ }
237237
238- if ( ! foundVersioned && ! foundGfortran ) {
239- core . setFailed (
240- 'gfortran is required to build fpm from source on macOS ARM64.\n' +
241- 'Please install gcc version 10-13 before running this action, for example:\n' +
242- ' - name: Install gfortran\n' +
243- ' run: brew install gcc@13\n' +
244- 'Or use fortran-lang/setup-fortran to install a Fortran compiler.'
245- ) ;
246- return ;
247- }
238+ if ( ! foundVersioned && ! foundGfortran ) {
239+ core . setFailed (
240+ 'gfortran is required to build fpm from source on macOS ARM64.\n' +
241+ 'Please install gcc version 10-13 before running this action, for example:\n' +
242+ ' - name: Install gfortran\n' +
243+ ' run: brew install gcc@13\n' +
244+ 'Or use fortran-lang/setup-fortran to install a Fortran compiler.'
245+ ) ;
246+ return ;
248247 }
249248
250249 const versionNumber = fpmVersion . replace ( 'v' , '' ) ;
0 commit comments