@@ -541,6 +541,7 @@ async function downloadCacheWithTime(
541541}
542542
543543async function loadUserConfig (
544+ logger : Logger ,
544545 configFile : string ,
545546 workspacePath : string ,
546547 apiDetails : api . GitHubApiCombinedDetails ,
@@ -557,9 +558,9 @@ async function loadUserConfig(
557558 ) ;
558559 }
559560 }
560- return getLocalConfig ( configFile ) ;
561+ return getLocalConfig ( logger , configFile ) ;
561562 } else {
562- return await getRemoteConfig ( configFile , apiDetails ) ;
563+ return await getRemoteConfig ( logger , configFile , apiDetails ) ;
563564 }
564565}
565566
@@ -816,6 +817,7 @@ export async function initConfig(inputs: InitConfigInputs): Promise<Config> {
816817 } else {
817818 logger . debug ( `Using configuration file: ${ inputs . configFile } ` ) ;
818819 userConfig = await loadUserConfig (
820+ logger ,
819821 inputs . configFile ,
820822 inputs . workspacePath ,
821823 inputs . apiDetails ,
@@ -913,18 +915,23 @@ function isLocal(configPath: string): boolean {
913915 return configPath . indexOf ( "@" ) === - 1 ;
914916}
915917
916- function getLocalConfig ( configFile : string ) : UserConfig {
918+ function getLocalConfig ( logger : Logger , configFile : string ) : UserConfig {
917919 // Error if the file does not exist
918920 if ( ! fs . existsSync ( configFile ) ) {
919921 throw new ConfigurationError (
920922 errorMessages . getConfigFileDoesNotExistErrorMessage ( configFile ) ,
921923 ) ;
922924 }
923925
924- return parseUserConfig ( configFile , fs . readFileSync ( configFile , "utf-8" ) ) ;
926+ return parseUserConfig (
927+ logger ,
928+ configFile ,
929+ fs . readFileSync ( configFile , "utf-8" ) ,
930+ ) ;
925931}
926932
927933async function getRemoteConfig (
934+ logger : Logger ,
928935 configFile : string ,
929936 apiDetails : api . GitHubApiCombinedDetails ,
930937) : Promise < UserConfig > {
@@ -963,6 +970,7 @@ async function getRemoteConfig(
963970 }
964971
965972 return parseUserConfig (
973+ logger ,
966974 configFile ,
967975 Buffer . from ( fileContents , "base64" ) . toString ( "binary" ) ,
968976 ) ;
0 commit comments