File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,8 @@ module compile {
152
152
if ( fileNameOrSettings !== undefined ) {
153
153
if ( typeof fileNameOrSettings === 'string' ) {
154
154
fileName = fileNameOrSettings ;
155
+ tsConfigFileName = path . resolve ( process . cwd ( ) , fileName ) ;
156
+ projectDirectory = path . dirname ( tsConfigFileName ) ;
155
157
if ( settings === undefined ) settings = { } ;
156
158
} else {
157
159
settings = fileNameOrSettings || { } ;
@@ -168,9 +170,7 @@ module compile {
168
170
169
171
compilerOptions = settingsResult . options ;
170
172
171
- if ( fileName ) {
172
- tsConfigFileName = path . resolve ( process . cwd ( ) , fileNameOrSettings ) ;
173
- projectDirectory = path . dirname ( tsConfigFileName ) ;
173
+ if ( fileName !== undefined ) {
174
174
let tsConfig = typescript . readConfigFile ( tsConfigFileName , typescript . sys . readFile ) ;
175
175
if ( tsConfig . error ) {
176
176
console . log ( tsConfig . error . messageText ) ;
You can’t perform that action at this time.
0 commit comments