@@ -526,6 +526,7 @@ async function downloadCacheWithTime(
526526}
527527
528528async function loadUserConfig (
529+ logger : Logger ,
529530 configFile : string ,
530531 workspacePath : string ,
531532 apiDetails : api . GitHubApiCombinedDetails ,
@@ -542,9 +543,9 @@ async function loadUserConfig(
542543 ) ;
543544 }
544545 }
545- return getLocalConfig ( configFile ) ;
546+ return getLocalConfig ( logger , configFile ) ;
546547 } else {
547- return await getRemoteConfig ( configFile , apiDetails ) ;
548+ return await getRemoteConfig ( logger , configFile , apiDetails ) ;
548549 }
549550}
550551
@@ -801,6 +802,7 @@ export async function initConfig(inputs: InitConfigInputs): Promise<Config> {
801802 } else {
802803 logger . debug ( `Using configuration file: ${ inputs . configFile } ` ) ;
803804 userConfig = await loadUserConfig (
805+ logger ,
804806 inputs . configFile ,
805807 inputs . workspacePath ,
806808 inputs . apiDetails ,
@@ -898,18 +900,23 @@ function isLocal(configPath: string): boolean {
898900 return configPath . indexOf ( "@" ) === - 1 ;
899901}
900902
901- function getLocalConfig ( configFile : string ) : UserConfig {
903+ function getLocalConfig ( logger : Logger , configFile : string ) : UserConfig {
902904 // Error if the file does not exist
903905 if ( ! fs . existsSync ( configFile ) ) {
904906 throw new ConfigurationError (
905907 errorMessages . getConfigFileDoesNotExistErrorMessage ( configFile ) ,
906908 ) ;
907909 }
908910
909- return parseUserConfig ( configFile , fs . readFileSync ( configFile , "utf-8" ) ) ;
911+ return parseUserConfig (
912+ logger ,
913+ configFile ,
914+ fs . readFileSync ( configFile , "utf-8" ) ,
915+ ) ;
910916}
911917
912918async function getRemoteConfig (
919+ logger : Logger ,
913920 configFile : string ,
914921 apiDetails : api . GitHubApiCombinedDetails ,
915922) : Promise < UserConfig > {
@@ -948,6 +955,7 @@ async function getRemoteConfig(
948955 }
949956
950957 return parseUserConfig (
958+ logger ,
951959 configFile ,
952960 Buffer . from ( fileContents , "base64" ) . toString ( "binary" ) ,
953961 ) ;
0 commit comments