File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -688,6 +688,19 @@ export function getCommandForConfiguration(configuration: string | undefined): v
688688 // makefile.configurations.makefilePath overwrites makefile.makefilePath.
689689 let makefileUsed : string | undefined = makefileConfiguration ?. makefilePath ? util . resolvePathToRoot ( makefileConfiguration ?. makefilePath ) : makefilePath ;
690690 if ( makefileUsed ) {
691+ // check if the makefile path is a directory. If so, try adding `Makefile` or `makefile`
692+ if ( util . checkDirectoryExistsSync ( makefileUsed ) ) {
693+ let makeFileTest = path . join ( makefileUsed , "Makefile" ) ;
694+ if ( ! util . checkFileExistsSync ( makeFileTest ) ) {
695+ makeFileTest = path . join ( makefileUsed , "makefile" ) ;
696+ }
697+
698+ // if we found the makefile in the directory, set the `makefileUsed` to the found file path.
699+ if ( util . checkFileExistsSync ( makeFileTest ) ) {
700+ makefileUsed = makeFileTest ;
701+ }
702+ }
703+
691704 configurationMakeArgs . push ( "-f" ) ;
692705 configurationMakeArgs . push ( `${ makefileUsed } ` ) ;
693706 // Need to rethink this (GitHub 59).
You can’t perform that action at this time.
0 commit comments