@@ -675,7 +675,7 @@ namespace ts {
675
675
name : "out" ,
676
676
type : "string" ,
677
677
affectsEmit : true ,
678
- isFilePath : false , // This is intentionally broken to support compatability with existing tsconfig files
678
+ isFilePath : false , // This is intentionally broken to support compatibility with existing tsconfig files
679
679
// for correct behaviour, please use outFile
680
680
category : Diagnostics . Advanced_Options ,
681
681
paramType : Diagnostics . FILE ,
@@ -2058,6 +2058,7 @@ namespace ts {
2058
2058
2059
2059
const parsedConfig = parseConfig ( json , sourceFile , host , basePath , configFileName , resolutionStack , errors , extendedConfigCache ) ;
2060
2060
const { raw } = parsedConfig ;
2061
+ makeFilesReferencesAbsolute ( existingOptions ) ;
2061
2062
const options = extend ( existingOptions , parsedConfig . options || { } ) ;
2062
2063
options . configFilePath = configFileName && normalizeSlashes ( configFileName ) ;
2063
2064
setConfigFileInOptions ( options , sourceFile ) ;
@@ -2169,6 +2170,17 @@ namespace ts {
2169
2170
errors . push ( createCompilerDiagnostic ( message , arg0 , arg1 ) ) ;
2170
2171
}
2171
2172
}
2173
+
2174
+ function makeFilesReferencesAbsolute ( optionsFromCLI : CompilerOptions ) {
2175
+ Object . keys ( optionsFromCLI ) . forEach ( key => {
2176
+ const optionForKey = getOptionDeclarationFromName ( getOptionNameMap , key , /*allowShort*/ true ) ;
2177
+ const value = optionsFromCLI [ key ] ;
2178
+ const relative = isString ( value ) && ! isRootedDiskPath ( value ) ;
2179
+ if ( relative && optionForKey && optionForKey . isFilePath && configFileName ) {
2180
+ optionsFromCLI [ key ] = getNormalizedAbsolutePath ( value as string , getDirectoryPath ( configFileName ) ) ;
2181
+ }
2182
+ } ) ;
2183
+ }
2172
2184
}
2173
2185
2174
2186
function isErrorNoInputFiles ( error : Diagnostic ) {
0 commit comments