File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -29,13 +29,19 @@ const log = Debug('CID:loadConfig');
2929export const CONFIG_FILE_ENCODING : fs . EncodingOption = 'utf-8' ;
3030
3131type LoadConfigResult =
32+ | { success : true ; lastUpdated : Date ; config : Config . Options }
3233 | {
3334 success : false ;
3435 error : string ;
35- isSaltFileError ?: true ;
36- config ?: Config . Options ;
36+ isSaltFileError : false ;
3737 }
38- | { success : true ; lastUpdated : Date ; config : Config . Options } ;
38+ | {
39+ success : false ;
40+ error : string ;
41+ isSaltFileError : true ;
42+ config : Config . Options ;
43+ } ;
44+
3945
4046// Main entry point for loading a config file.
4147// returns:
@@ -54,6 +60,7 @@ export function loadConfig(configPath: string, region: string): LoadConfigResult
5460 return {
5561 success : false ,
5662 error : `Unable to read config file '${ configPath } '` ,
63+ isSaltFileError : false
5764 } ;
5865 }
5966
@@ -68,6 +75,7 @@ export function loadConfig(configPath: string, region: string): LoadConfigResult
6875 return {
6976 success : false ,
7077 error : validationResult ,
78+ isSaltFileError : false ,
7179 } ;
7280 }
7381
@@ -80,6 +88,7 @@ export function loadConfig(configPath: string, region: string): LoadConfigResult
8088 return {
8189 success : false ,
8290 error : `Configuration file signature mismatch -- required signature is '${ configData . meta . signature } ' but user configuration has '${ configHash } ' ` ,
91+ isSaltFileError : false
8392 } ;
8493 }
8594
You can’t perform that action at this time.
0 commit comments